web/formwidgets.py
branchstable
changeset 9134 a5f53b023132
parent 8936 010adc548b97
child 9222 ec65ca70aac9
--- a/web/formwidgets.py	Wed Jun 27 11:53:46 2012 +0200
+++ b/web/formwidgets.py	Wed Jul 03 14:43:21 2013 +0200
@@ -1016,6 +1016,8 @@
     time, you should not give an already translated string.
     """
     type = 'button'
+    css_class = 'validateButton'
+
     def __init__(self, label=stdmsgs.BUTTON_OK, attrs=None,
                  setdomid=None, settabindex=None,
                  name='', value='', onclick=None, cwaction=None):
@@ -1030,7 +1032,7 @@
         self.value = ''
         self.onclick = onclick
         self.cwaction = cwaction
-        self.attrs.setdefault('class', 'validateButton')
+        self.attrs.setdefault('class', self.css_class)
 
     def render(self, form, field=None, renderer=None):
         label = form._cw._(self.label)