[forms] some style for htable renderer layout stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 06 Oct 2009 17:18:10 +0200
branchstable
changeset 3572 606ce53dc557
parent 3571 54743fc6172c
child 3573 cdb41ceeffc7
[forms] some style for htable renderer layout
web/data/cubicweb.css
web/views/formrenderers.py
--- a/web/data/cubicweb.css	Tue Oct 06 17:16:23 2009 +0200
+++ b/web/data/cubicweb.css	Tue Oct 06 17:18:10 2009 +0200
@@ -747,6 +747,21 @@
   top: -1px;
 }
 
+table.htableForm {
+  vertical-align: middle;
+}
+table.htableForm td{
+  padding-left: 1em;
+  padding-top: 0.5em;
+}
+table.htableForm th{
+  padding-left: 1em;
+}
+table.htableForm .validateButton {
+  margin-right: 0.2em;
+  vertical-align: top;
+  margin-bottom: 0.2em; /* because vertical-align doesn't seems to have any effect */
+}
 
 /***************************************/
 /* error view (views/management.py)    */
--- a/web/views/formrenderers.py	Tue Oct 06 17:16:23 2009 +0200
+++ b/web/views/formrenderers.py	Tue Oct 06 17:18:10 2009 +0200
@@ -273,7 +273,7 @@
 
     display_help = False
     def _render_fields(self, fields, w, form):
-        w(u'<table border="0">')
+        w(u'<table border="0" class="htableForm">')
         w(u'<tr>')
         for field in fields:
             if self.display_label: