changeset 2334:c5e5e9e176d2

add "checked" to truth values for Boolean input
author Richard Jones <richard@users.sourceforge.net>
date Tue, 18 May 2004 21:53:18 +0000
parents 804c5c735bf1
children 258cfa16f63c
files CHANGES.txt roundup/hyperdb.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Tue May 18 19:46:35 2004 +0000
+++ b/CHANGES.txt	Tue May 18 21:53:18 2004 +0000
@@ -7,6 +7,11 @@
 - added support for HTTP charset selection
 
 
+2004-05-?? 0.7.3
+Fixed:
+- add "checked" to truth values for Boolean input
+
+
 2004-05-?? 0.7.2
 Fixed:
 - anydbm sorting with None values (sf bug 952853)
--- a/roundup/hyperdb.py	Tue May 18 19:46:35 2004 +0000
+++ b/roundup/hyperdb.py	Tue May 18 21:53:18 2004 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: hyperdb.py,v 1.97 2004-05-02 23:16:05 richard Exp $
+# $Id: hyperdb.py,v 1.98 2004-05-18 21:53:18 richard Exp $
 
 """Hyperdatabase implementation, especially field types.
 """
@@ -743,7 +743,8 @@
         value = [str(x) for x in value]
     elif isinstance(proptype, Boolean):
         value = value.strip()
-        value = value.lower() in ('yes', 'true', 'on', '1')
+        # checked is a common HTML checkbox value
+        value = value.lower() in ('checked', 'yes', 'true', 'on', '1')
     elif isinstance(proptype, Number):
         value = value.strip()
         try:

Roundup Issue Tracker: http://roundup-tracker.org/