From 02743e9e1604fd234961ff01701ca32bf96ac1e5 Mon Sep 17 00:00:00 2001 From: James Robert Date: Mon, 6 May 2013 16:10:36 -0300 Subject: [PATCH] support radio buttons --- .../templates/bootstrapform/field.html | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/bootstrapform/templates/bootstrapform/field.html b/bootstrapform/templates/bootstrapform/field.html index 7791c28..cecb1b7 100644 --- a/bootstrapform/templates/bootstrapform/field.html +++ b/bootstrapform/templates/bootstrapform/field.html @@ -1,21 +1,37 @@ {% load bootstrap %}
{% if field|is_checkbox %} -
- +
+ - {% for error in field.errors %} - {{ error }} - {% endfor %} + {% for error in field.errors %} + {{ error }} + {% endfor %} - {% if field.help_text %} -

- {{ field.help_text|safe }} -

- {% endif %} -
+ {% if field.help_text %} +

+ {{ field.help_text|safe }} +

+ {% endif %} +
+ {% else %}{% if field|is_radio %} +
+ + + {% for error in field.errors %} + {{ error }} + {% endfor %} + + {% if field.help_text %} +

+ {{ field.help_text|safe }} +

+ {% endif %} +
{% else %} @@ -33,5 +49,5 @@ {% endif %}
- {% endif %} + {% endif %}{% endif %}