From d225912babad8a98c4d79e423b239486a689e4ac Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Fri, 16 Dec 2011 11:14:20 -0600 Subject: [PATCH] issue 519 --- VERSION | 2 +- gluon/html.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index f2917afc..342f6471 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2011-12-16 10:35:39) stable +Version 1.99.4 (2011-12-16 11:14:12) stable diff --git a/gluon/html.py b/gluon/html.py index 6c599da6..97c29b35 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -1583,7 +1583,9 @@ class INPUT(DIV): _value = None else: _value = str(self['_value']) - if t == 'checkbox' and not '_checked' in self.attributes: + if '_checked' in self.attributes and not 'value' in self.attributes: + pass + elif t == 'checkbox': if not _value: _value = self['_value'] = 'on' if not value: @@ -1593,7 +1595,7 @@ class INPUT(DIV): elif not isinstance(value,(list,tuple)): value = str(value).split('|') self['_checked'] = _value in value and 'checked' or None - elif t == 'radio' and not '_checked' in self.attributes: + elif t == 'radio': if str(value) == str(_value): self['_checked'] = 'checked' else: