From f62b0d8be7f2f68a72d7c0f1a42ece3a8e4c0962 Mon Sep 17 00:00:00 2001 From: Melvin Laplanche Date: Sat, 24 Aug 2013 16:12:26 +0200 Subject: [PATCH] Fix radio --- .../templates/bootstrapform/field.html | 26 +++++++++---------- bootstrapform/templatetags/bootstrap.py | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bootstrapform/templates/bootstrapform/field.html b/bootstrapform/templates/bootstrapform/field.html index 100ff1d..e59fa6e 100644 --- a/bootstrapform/templates/bootstrapform/field.html +++ b/bootstrapform/templates/bootstrapform/field.html @@ -23,24 +23,24 @@
-
- {% for choice in field %} -
+ {% if field.help_text %} +

+ {{ field.help_text|safe }} +

+ {% endif %}
{% else %} diff --git a/bootstrapform/templatetags/bootstrap.py b/bootstrapform/templatetags/bootstrap.py index a9d8e33..3ab5aac 100644 --- a/bootstrapform/templatetags/bootstrap.py +++ b/bootstrapform/templatetags/bootstrap.py @@ -48,7 +48,7 @@ def bootstrap_horizontal(element, label_cols={}): def add_input_classes(field): - if not is_checkbox(field) and not is_multiple_checkbox(field): + if not is_checkbox(field) and not is_multiple_checkbox(field) and not is_radio(field): field_classes = field.field.widget.attrs.get('class', '') field_classes += ' form-control' field.field.widget.attrs['class'] = field_classes