[web/views] stop using cwaction='cancel'
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 15 Mar 2016 16:58:50 +0100
changeset 11197 9f1c89e7426d
parent 11196 74b04a88d28a
child 11198 10c12f31d0fe
[web/views] stop using cwaction='cancel' It's broken as of https://hg.logilab.org/master/cubicweb/rev/cb217b2b3
cubicweb/web/views/editforms.py
cubicweb/web/views/workflow.py
--- a/cubicweb/web/views/editforms.py	Wed Mar 16 00:42:40 2016 +0100
+++ b/cubicweb/web/views/editforms.py	Tue Mar 15 16:58:50 2016 +0100
@@ -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)
--- a/cubicweb/web/views/workflow.py	Wed Mar 16 00:42:40 2016 +0100
+++ b/cubicweb/web/views/workflow.py	Tue Mar 15 16:58:50 2016 +0100
@@ -86,7 +86,8 @@
 
     form_renderer_id = 'base' # don't want EntityFormRenderer
     form_buttons = [fwdgs.SubmitButton(),
-                    fwdgs.Button(stdmsgs.BUTTON_CANCEL, cwaction='cancel')]
+                    fwdgs.Button(stdmsgs.BUTTON_CANCEL,
+                                 {'class': fwdgs.Button.css_class + ' cwjs-edition-cancel'})]
 
 
 class ChangeStateFormView(form.FormViewMixIn, EntityView):