web/views/editforms.py
branchtls-sprint
changeset 1692 56009f2101fe
parent 1685 3c59ae0e6548
child 1703 a2b5dfdb4b62
--- a/web/views/editforms.py	Tue May 05 17:16:01 2009 +0200
+++ b/web/views/editforms.py	Tue May 05 17:26:21 2009 +0200
@@ -251,12 +251,14 @@
 
 class TableEditForm(CompositeForm):
     id = 'muledit'
-    onsubmit = "return validateForm('entityForm', null);"
+    domid = 'entityForm'
+    onsubmit = "return validateForm('%s', null);" % domid
     form_buttons = [SubmitButton(_('validate modifications on selected items')),
                     ResetButton(_('revert changes'))]
 
-    def __init__(self, *args, **kwargs):
-        super(TableEditForm, self).__init__(*args, **kwargs)
+    def __init__(self, req, rset, **kwargs):
+        kwargs.setdefault('__redirectrql', rset.printable_rql())
+        super(TableEditForm, self).__init__(req, rset, **kwargs)
         for row in xrange(len(self.rset)):
             form = self.vreg.select_object('forms', 'edition', self.req, self.rset,
                                            row=row, attrcategories=('primary',),