[Mpuls-commits] r3787 - in wasko/trunk: . waskoweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 27 15:23:29 CEST 2010


Author: bh
Date: 2010-09-27 15:23:29 +0200 (Mon, 27 Sep 2010)
New Revision: 3787

Modified:
   wasko/trunk/ChangeLog
   wasko/trunk/waskoweb/controllers/formularpage.py
Log:
* waskoweb/controllers/formularpage.py
(FormularpageController.save): Use the base class method
_handle_repeat_group_redirects to handle the repeat group actions.
The inline code for this is identical to the contents of that base
class method.


Modified: wasko/trunk/ChangeLog
===================================================================
--- wasko/trunk/ChangeLog	2010-09-27 12:52:15 UTC (rev 3786)
+++ wasko/trunk/ChangeLog	2010-09-27 13:23:29 UTC (rev 3787)
@@ -1,3 +1,11 @@
+2010-09-27  Bernhard Herzog  <bh at intevation.de>
+
+	* waskoweb/controllers/formularpage.py
+	(FormularpageController.save): Use the base class method
+	_handle_repeat_group_redirects to handle the repeat group actions.
+	The inline code for this is identical to the contents of that base
+	class method.
+
 2010-09-21  Bernhard Herzog  <bh at intevation.de>
 
 	Implement mpuls/issue1092 (search for migration background)

Modified: wasko/trunk/waskoweb/controllers/formularpage.py
===================================================================
--- wasko/trunk/waskoweb/controllers/formularpage.py	2010-09-27 12:52:15 UTC (rev 3786)
+++ wasko/trunk/waskoweb/controllers/formularpage.py	2010-09-27 13:23:29 UTC (rev 3787)
@@ -108,18 +108,8 @@
             session.save()
             
             # How to proceed after saving the data?
-            for param in request.params:
-                if param.startswith('add_rg') and not param.endswith(('x','y')):
-                    if param == 'add_rg':
-                        redirect_to(controller='/repeatgroup', action="new",
-                                    id=request.params.get('add_rg'))
-                    else:
-                        redirect_to(controller='/repeatgroup', action="new",
-                                    id=param.split('|')[1])
-                elif param.startswith('del_rg') and not param.endswith(('x','y')):
-                    redirect_to(controller='/repeatgroup', action="delete",
-                                id=param.split('|')[1])
-            
+            self._handle_repeat_group_redirects()
+
             if request.params.has_key('savenext'):
                 page_id = session['navigation.tree'].getTreeItem(page_id).nextKey().key
 



More information about the Mpuls-commits mailing list