put form buttons in a separate table tls-sprint
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 20 Feb 2009 15:51:42 +0100
branchtls-sprint
changeset 896 6e0379fc1988
parent 895 e78ae38506db
child 897 f5b91f11d8b6
put form buttons in a separate table
web/form.py
--- a/web/form.py	Fri Feb 20 15:46:38 2009 +0100
+++ b/web/form.py	Fri Feb 20 15:51:42 2009 +0100
@@ -779,7 +779,7 @@
         w = data.append
         # XXX form_needs_multipart
         w(self.open_form(form))
-        w(u'<div id="progress">%s</div>' % _('validating...'))
+        w(u'<div id="progress">%s</div>' % form.req._('validating...'))
         w(u'<fieldset>')
         w(tags.input(type='hidden', name='__form_id', value=form.domid))
         if form.redirect_path:
@@ -829,8 +829,10 @@
     #def render_field(self, w, form, field):
         
     def render_buttons(self, w, form):
+        w(u'<table class="formButtonBar">\n<tr>\n')
         for button in form.form_buttons():
-            w(button)
+            w(u'<td>%s</td>\n' % button)
+        w(u'</tr></table>')
         
     def render_label(self, form, field):
         label = form.req._(field.label)