azavea/OTM2 — pull request #228 by jwalgran (2013-08-20 17:32:53+00:00)
Title: Add a reusable form field template tag and use it to build the a user edit form

There are several places in the application where we need to create in place edit forms and show and hide values and edit fields based on user permissions. This template tag wraps up the logic of fetching metadata about a field and passing into the context of a child template to render the actual markup.

While editing the user form I changed the way ugettext was aliased. The team decided to not alias translation functions to _, which we use for throwaway function return values. We instead settled on 'trans' which matches the template tag for translation.

I added public_fields and private_fields to the context for the user edit page so that I could translate the static labels, since django forbids nesting our custom 'field' block tag inside a 'blocktrans' tag.