I just put in a retail code, and you do still get the free 30 days after upgrading from a trial account, but the 30 days starts right when you put the code in. So if anybody else is playing a trial and plans on upgrading, unless the trial account restrictions are a big deal for you, wait until the end of the trial to put in the retail code to get the full 14 days free and an additional 30 days free.
EDIT: After I put in a prepaid game card, and looked at my subscrption, it says the 14 day trial is still active, with the free month pending. So it turns out afterall that if you get the 14 day trial, then buy the game, you get the 14 days free, and then after that, the free month from buying the game. When I put the retail code in, it said that the free month was "now activated," which I thought meant that it started taking the time off of that free month.