[forms] muledit mainform should copy nav params, its subforms shouldn't stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 19 Nov 2009 17:06:46 +0100
branchstable
changeset 3880 88fc53eb5b5f
parent 3879 7bb87da97026
child 3883 b3b3bebdb406
[forms] muledit mainform should copy nav params, its subforms shouldn't
web/views/editforms.py
web/views/forms.py
--- a/web/views/editforms.py	Thu Nov 19 14:28:59 2009 +0100
+++ b/web/views/editforms.py	Thu Nov 19 17:06:46 2009 +0100
@@ -436,6 +436,7 @@
             form = self.vreg['forms'].select('edition', self.req,
                                              rset=self.rset, row=row,
                                              attrcategories=('primary',),
+                                             copy_nav_params=False,
                                              mainform=False)
             # XXX rely on the EntityCompositeFormRenderer to put the eid input
             form.remove_field(form.field_by_name('eid'))
@@ -452,7 +453,8 @@
         should be the eid
         """
         #self.form_title(entity)
-        form = self.vreg['forms'].select(self.id, self.req, rset=self.rset)
+        form = self.vreg['forms'].select(self.id, self.req, rset=self.rset,
+                                         copy_nav_params=True)
         self.w(form.form_render())
 
 
--- a/web/views/forms.py	Thu Nov 19 14:28:59 2009 +0100
+++ b/web/views/forms.py	Thu Nov 19 17:06:46 2009 +0100
@@ -89,6 +89,7 @@
         if mainform:
             self.form_add_hidden('__errorurl', self.session_key())
             self.form_add_hidden('__domid', self.domid)
+        # XXX why do we need two different variables (mainform and copy_nav_params ?)
         if self.copy_nav_params:
             for param in NAV_FORM_PARAMETERS:
                 if not param in kwargs: