[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - widget.py:1.32
Jim Fulton
jim@zope.com
Tue, 27 May 2003 17:14:42 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv14263/src/zope/app/browser/form
Modified Files:
widget.py
Log Message:
Fixed some tests to account for the fact that booleans print
differently in Python 2.2 and 2.3.
=== Zope3/src/zope/app/browser/form/widget.py 1.31 => 1.32 ===
--- Zope3/src/zope/app/browser/form/widget.py:1.31 Thu May 22 18:49:04 2003
+++ Zope3/src/zope/app/browser/form/widget.py Tue May 27 17:14:11 2003
@@ -230,7 +230,7 @@
id="field.foo"
name="field.foo"
type="hidden"
- value="1"
+ value="on"
/>
Calling setData will change what gets output:
@@ -282,6 +282,10 @@
)
def _convert(self, value):
+ return value == 'on'
+
+ def _unconvert(self, value):
+ return value and "on" or ""
return value == 'on'
def haveData(self):