[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/ Changed the checkbox widget to set the value attribute. The HTML 4

Jim Fulton jim at zope.com
Mon Jan 24 10:52:51 EST 2005


Log message for revision 28925:
  Changed the checkbox widget to set the value attribute.  The HTML 4
  spec says this is required:
  
  http://www.htmlhelp.com/reference/html40/forms/input.html
  

Changed:
  U   Zope3/trunk/src/zope/app/form/browser/boolwidgets.py
  U   Zope3/trunk/src/zope/app/form/browser/tests/test_checkboxwidget.py

-=-
Modified: Zope3/trunk/src/zope/app/form/browser/boolwidgets.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/boolwidgets.py	2005-01-24 15:50:56 UTC (rev 28924)
+++ Zope3/trunk/src/zope/app/form/browser/boolwidgets.py	2005-01-24 15:52:51 UTC (rev 28925)
@@ -57,6 +57,7 @@
                           id=self.name,
                           cssClass=self.cssClass,
                           extra=self.extra,
+                          value="on",
                           **kw),
             )
 

Modified: Zope3/trunk/src/zope/app/form/browser/tests/test_checkboxwidget.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/tests/test_checkboxwidget.py	2005-01-24 15:50:56 UTC (rev 28924)
+++ Zope3/trunk/src/zope/app/form/browser/tests/test_checkboxwidget.py	2005-01-24 15:52:51 UTC (rev 28925)
@@ -85,6 +85,7 @@
           id="field.foo"
           name="field.foo"
           type="checkbox"
+          value="on"
           />
 
     Hidden rendering:
@@ -114,6 +115,7 @@
           id="field.foo"
           name="field.foo"
           type="checkbox"
+          value="on"
           />
 
     The checkbox widget does not support None values, so a Bool required



More information about the Zope3-Checkins mailing list