don't set display: block on hidden input stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 07 Aug 2009 12:10:32 +0200
branchstable
changeset 2723 d38c2b01d766
parent 2714 4a8d93bd7c72
child 2724 7966d87202d7
don't set display: block on hidden input
web/formfields.py
--- a/web/formfields.py	Thu Aug 06 09:40:40 2009 +0200
+++ b/web/formfields.py	Fri Aug 07 12:10:32 2009 +0200
@@ -283,7 +283,8 @@
         format_field = self.get_format_field(form)
         if format_field:
             # XXX we want both fields to remain vertically aligned
-            format_field.widget.attrs['style'] = 'display: block'
+            if format_field.is_visible():
+                format_field.widget.attrs['style'] = 'display: block'
             result = format_field.render(form, renderer)
         else:
             result = u''