Commit 59fc2aff authored by Jérome Perrin's avatar Jérome Perrin

Patched version of Formulator uses `key` to generate field keys in request,...

Patched version of Formulator uses `key` to generate field keys in request, not field id, so DateTime fields displayed old value instead of value in request when validation failed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6051 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b65c89a
...@@ -573,7 +573,7 @@ def DateTimeField_get_default(self, key, value, REQUEST): ...@@ -573,7 +573,7 @@ def DateTimeField_get_default(self, key, value, REQUEST):
# if there is something in the request then return None # if there is something in the request then return None
# sub fields should pick up defaults themselves # sub fields should pick up defaults themselves
if REQUEST is not None and hasattr(REQUEST, 'form') and \ if REQUEST is not None and hasattr(REQUEST, 'form') and \
REQUEST.form.has_key('subfield_%s_%s' % (self.id, 'year')): REQUEST.form.has_key('subfield_%s_%s' % (key, 'year')):
return None return None
else: else:
return self.get_value('default') return self.get_value('default')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment