From 78a2dd3ecc87ccf7be528b7fa876ac683f723055 Mon Sep 17 00:00:00 2001 From: Jeff Dairiki Date: Mon, 30 Sep 2013 19:50:26 -0700 Subject: [PATCH 1/5] Support for .form-horizontal and .form-inline layouts I'd be all for renaming Form.bootstrap_form_style to something shorter. (Also, I think it makes more sense as an attribute of FormWidget rather than of Form.) Deform_bootstrap uses Form.bootstrap_form_style, however, so compatibility considerations may be warranted. --- deform/templates/form.pt | 30 ++++++++---- deform/templates/mapping_item.pt | 82 ++++++++++++++++++-------------- deform/widget.py | 12 +++++ 3 files changed, 79 insertions(+), 45 deletions(-) diff --git a/deform/templates/form.pt b/deform/templates/form.pt index bbdc75c9..5b8033b3 100644 --- a/deform/templates/form.pt +++ b/deform/templates/form.pt @@ -11,7 +11,9 @@ ajax_options ajax_options|field.ajax_options; formid formid|field.formid; action action|field.action or None; - method method|field.method;" + method method|field.method; + column_classes column_classes|field.widget.column_classes;" + tal:attributes="autocomplete autocomplete; style style; class css_class; @@ -43,11 +45,19 @@

+ tal:replace="structure child.render_template(item_template, form_class=css_class, column_classes=column_classes)"/> -
- - - + + ${button.title} + + +
-