[forms] consider __action_xxx field if passed to JSonController.validate_form stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 20 May 2010 10:04:45 +0200
branchstable
changeset 5546 1bdaa9e1cd57
parent 5542 a8ad3df5a8a3
child 5548 d29d1a1ce15d
[forms] consider __action_xxx field if passed to JSonController.validate_form
web/views/basecontrollers.py
--- a/web/views/basecontrollers.py	Tue May 18 16:49:41 2010 +0200
+++ b/web/views/basecontrollers.py	Thu May 20 10:04:45 2010 +0200
@@ -314,6 +314,9 @@
         for name, value in zip(names, values):
             # remove possible __action_xxx inputs
             if name.startswith('__action'):
+                if action is None:
+                    # strip '__action_' to get the actual action name
+                    action = name[9:]
                 continue
             # form.setdefault(name, []).append(value)
             if name in form: