override form_build_context instead of form_render so we get sure to call form_add_entity_hiddens even on subforms tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 08 Apr 2009 20:37:55 +0200
branchtls-sprint
changeset 1308 3d01229d9f6a
parent 1307 8c3336c5ddba
child 1309 a4eb20f86cb0
override form_build_context instead of form_render so we get sure to call form_add_entity_hiddens even on subforms
web/form.py
--- a/web/form.py	Wed Apr 08 20:37:22 2009 +0200
+++ b/web/form.py	Wed Apr 08 20:37:55 2009 +0200
@@ -358,9 +358,9 @@
                 msg = '%s %s' % (msg, self.req._('and linked'))
             self.form_add_hidden('__message', msg)
         
-    def form_render(self, **values):
+    def form_build_context(self, values):
         self.form_add_entity_hiddens(self.edited_entity.e_schema)
-        return super(EntityFieldsForm, self).form_render(**values)
+        return super(EntityFieldsForm, self).form_build_context(values)
 
     def form_add_entity_hiddens(self, eschema):
         for field in self.fields[:]: