FORGE-319: make a distinction between a custom field label and its (identifier) name

Users can be expected to enter a label and may for instance supply:

est. time (hours)

...which makes a very bad identifier. We need an identifier that can be
used as both a key in our dict() and as a field-name in our input forms.
Also, we should prevent custom fields from colliding with non-custom
fields. To that end, munge labels into names by prefixing with _ and
replacing any non-alphanumeric separating run with _. E.g., the example
above becomes

_est_time_hours

While we're at it, we'll title-case the label so it matches the display
of standard fields. The perfect place calculate both these values is in
Python where we are accepting the json that describes the custom fields:
TrackerAdminControler.set_custom_fields. Both are easier in Python than
in JavaScript (sorry, JavaScript).

Wolf Wolf 2010-02-26

changed ForgeTracker/forgetracker/static/Tickets/js/custom-fields.js
changed ForgeTracker/forgetracker/templates/admin.html
changed ForgeTracker/forgetracker/templates/edit_ticket.html
changed ForgeTracker/forgetracker/templates/new_ticket.html
changed ForgeTracker/forgetracker/templates/ticket.html
changed ForgeTracker/forgetracker/tracker_main.py
ForgeTracker/forgetracker/static/Tickets/js/custom-fields.js Diff Switch to side-by-side view
Loading...
ForgeTracker/forgetracker/templates/admin.html Diff Switch to side-by-side view
Loading...
ForgeTracker/forgetracker/templates/edit_ticket.html Diff Switch to side-by-side view
Loading...
ForgeTracker/forgetracker/templates/new_ticket.html Diff Switch to side-by-side view
Loading...
ForgeTracker/forgetracker/templates/ticket.html Diff Switch to side-by-side view
Loading...
ForgeTracker/forgetracker/tracker_main.py Diff Switch to side-by-side view
Loading...