Commit graph

7 commits

Author SHA1 Message Date
Henrik Levkowetz cf20093762 * Moved utility functions into utils/ directory, and started breaking out
utilities into separate files.
 * Added a log() function in ietf/utils.  It uses syslog, but adds some
   information about where it was called from.
 - Legacy-Id: 130
2007-05-11 15:48:45 +00:00
Bill Fenner 95209614b5 Introduce contrib/ to hold form wizard tool from django's trac.
Move form_decorator help function from utils.py to contrib/
 - Legacy-Id: 121
2007-05-10 21:57:22 +00:00
Henrik Levkowetz c915c5f7e6 * Added automatic 'required-field' indicator to the form rendering
* Made 'Legal Name' field in the IprDetails model required
 - Legacy-Id: 107
2007-05-06 23:29:10 +00:00
Henrik Levkowetz e8980df65f IPR Form display now works with the same template as data display.
Using some more logic in views.py, less in the templated.

 * Some tweaks in FormattingForm rendering.
 * Selection of which sections to show is now table driven in views.py
 * Some minor refactoring and cleanup in views.py
 * Some more form subclassing in ipr/views.py in order to support form
   validation.
 * Removed style information from ipr/details.html template, and added
   ipr/style.html
 * Cleanup of details.html
 * Fixed ipr/formfield.html to display error messages, and with the right
   class.
 - Legacy-Id: 105
2007-05-06 19:18:17 +00:00
Henrik Levkowetz 68d4a58fa7 The fourth (and last?) take on a form from multiple models,
using pretty much the same template as for a non-form view.

This solution is less hackish than the previous one which
used the form.as_table() rendering of a form, and then split
the resulting html in chunks.

Instead, '''all''' the html has been moved out to a formfield
template, and a custom form class is generated which will render
the form elements using an indicated template.

 * Add form factory in utils.py (an old version which still has
   html in the code is there for history, but will be removed

 * Changes in ipr/views.py:new(), now subclassing one form with
   some class members being other form instances, matching the
   members used for the show() view

 * A fix in ipr/models, making an email field use models.EmailField

 * Reverting a number of changes in ipr/details.html which aren't
   needed any more, as well as in ipr/new.html; and adding
   ipr/formfield.html
 - Legacy-Id: 104
2007-05-06 05:35:46 +00:00
Henrik Levkowetz c2c08c9edc * Added a new funtion in utils.py: split_form()
* Re-wrote the IPR declaration form using form.to_table()
   and the split_form() function in order to get sub-blocks
   of the form which could easily be used with the existing
   IPR detail display templates.

   How to merge forms from multiple models took some thinking;
   since the forms have a common ancestor, multiple inheritance
   doesn't preserve the form data.  In the end the merging
   didn't turn out too horrible.  See ipr.views.new().
 * Changed the IprDetail model; first to specify editable=False
   for all fieleds which shouldn't be shown in the form, but
   this has the drawback of also removing them from the admin
   page form.  Simply bagging them in an un-used sub block with
   split_form() works fine.
 * Changed the URLs for IPR by-date some again
 * Updated the ipr/new* templates to use the form sub-blocks
 - Legacy-Id: 97
2007-05-04 20:21:03 +00:00
Henrik Levkowetz 5872696834 Moving ietf to trunk/ietf
[[Split portion of a mixed commit.]]
 - Legacy-Id: 96.1
2007-05-04 12:37:28 +00:00