oops, should use input tag in radio, not option tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 08 Apr 2009 13:18:30 +0200
branchtls-sprint
changeset 1295 3012c655a94d
parent 1294 870bc725cc9a
child 1296 05579925d66e
oops, should use input tag in radio, not option
web/formwidgets.py
--- a/web/formwidgets.py	Wed Apr 08 13:17:32 2009 +0200
+++ b/web/formwidgets.py	Wed Apr 08 13:18:30 2009 +0200
@@ -165,10 +165,12 @@
         options = []
         for label, value in field.vocabulary(form):
             if value in curvalues:
-                options.append(tags.input(name=name, type=self.type, value=value, checked='checked', **attrs))
+                tag = tags.input(name=name, type=self.type, value=value,
+                                 checked='checked', **attrs)
             else:
-                options.append(tags.option(name=name, type=self.type, value=value, **attrs))
-            options[-1] += label + '<br/>'
+                tag = tags.input(name=name, type=self.type, value=value, **attrs)
+            tag += label + '<br/>'
+            options.append(tag)
         return '\n'.join(options)