web/views/editforms.py
branchstable
changeset 4668 9f82f81bf13d
parent 4649 9a6db1eb12ff
child 4669 2a77a0d9075f
--- a/web/views/editforms.py	Thu Feb 18 14:30:23 2010 +0100
+++ b/web/views/editforms.py	Tue Feb 23 17:32:31 2010 +0100
@@ -101,7 +101,7 @@
                                              entity=entity,
                                              submitmsg=self.submited_message())
         self.init_form(form, entity)
-        self.w(form.render(formvid=u'edition'))
+        self.w(form.render())
 
     def init_form(self, form, entity):
         """customize your form before rendering here"""
@@ -234,10 +234,6 @@
         """a view to edit multiple entities of the same type the first column
         should be the eid
         """
-        #self.form_title(entity)
-        form = self._cw.vreg['forms'].select(self.__regid__, self._cw,
-                                             rset=self.cw_rset,
-                                             copy_nav_params=True)
         # XXX overriding formvid (eg __form_id) necessary to make work edition:
         # the edit controller try to select the form with no rset but
         # entity=entity, and use this form to edit the entity. So we want
@@ -245,7 +241,11 @@
         # side effect. Maybe we should provide another variable optinally
         # telling which form the edit controller should select (eg difffers
         # between html generation / post handling form)
-        self.w(form.render(formvid='edition'))
+        form = self._cw.vreg['forms'].select(self.__regid__, self._cw,
+                                             rset=self.cw_rset,
+                                             copy_nav_params=True,
+                                             formvid='edition')
+        self.w(form.render())
 
 
 # click and edit handling ('reledit') ##########################################