fix label generation in forms tls-sprint
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 20 Feb 2009 17:18:54 +0100
branchtls-sprint
changeset 904 4f1ce95aa686
parent 903 63a8ab7eeb9c
child 905 64fd6eaaa9a4
fix label generation in forms
web/form.py
--- a/web/form.py	Fri Feb 20 16:04:04 2009 +0100
+++ b/web/form.py	Fri Feb 20 17:18:54 2009 +0100
@@ -396,7 +396,7 @@
     widget = TextInput
     needs_multipart = False
     creation_rank = 0
-    
+
     def __init__(self, name=None, id=None, label=None,
                  widget=None, required=False, initial=None,
                  choices=None, help=None, eidparam=False):
@@ -425,7 +425,7 @@
             self.label = name
             
     def is_visible(self):
-        return isinstance(self.widget, HiddenInput)
+        return not isinstance(self.widget, HiddenInput)
     
     def actual_fields(self, form):
         yield self