Issue 1599740
Created on 2006-11-20 14:00 by stefan, last changed 2006-11-23 00:24 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
patch
|
stefan,
2006-11-20 14:00
|
|
|
|
msg2350 |
Author: [hidden] (stefan) |
Date: 2006-11-20 14:00 |
|
Right now forms have to provide values for all
required fields unconditionally.
The templating code already checks for is_edit_ok,
and only generates form fields for those properties
that the user has edit permission for.
However, if the user doesn't have edit permission
for a required field, the html template has to
provide a hidden input with the old value, to
satisfy the validity check in cgi/form_parser.py.
The attached patch enhances the form parser by
allowing those required fields to be omitted if
the user doesn't have edit permission and the
property is already set in the database.
|
msg2351 |
Author: [hidden] (richard) |
Date: 2006-11-23 00:24 |
|
Patch looks good, though:
1. I'd prefer without the print statement :)
2. cl.get(nodeid, entry) could return a false value for eg. Boolean
-- it would be better to check for "is None".
Please apply the patch once you've fixed the above. Please consider also adding a unit test.
|
|
Date |
User |
Action |
Args |
2006-11-20 14:00:38 | stefan | create | |
|