Fix cancel action on deletion confirmation form
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 10 Jun 2016 13:21:13 +0200
changeset 11294 cd1183a65ebb
parent 11293 63c589e6b076
child 11295 00d42916f238
Fix cancel action on deletion confirmation form Currently crashed with RequestError: invalid action '__action_cancel'. It's broken as of https://hg.logilab.org/master/cubicweb/rev/cb217b2b3 This fix is similar as the one done in https://hg.logilab.org/master/cubicweb/rev/9f1c89e7426d Closes #13521493
web/views/editforms.py
--- a/web/views/editforms.py	Mon Jun 06 21:19:04 2016 +0200
+++ b/web/views/editforms.py	Fri Jun 10 13:21:13 2016 +0200
@@ -52,7 +52,8 @@
     domid = 'deleteconf'
     copy_nav_params = True
     form_buttons = [fw.Button(stdmsgs.BUTTON_DELETE, cwaction='delete'),
-                    fw.Button(stdmsgs.BUTTON_CANCEL, cwaction='cancel')]
+                    fw.Button(stdmsgs.BUTTON_CANCEL,
+                              {'class': fw.Button.css_class + ' cwjs-edition-cancel'})]
 
     def __init__(self, *args, **kwargs):
         super(DeleteConfForm, self).__init__(*args, **kwargs)