From cb87f070962090d10c2e28ea06d46bbb4c53145d Mon Sep 17 00:00:00 2001 From: tzangms Date: Tue, 22 Nov 2011 00:36:59 +0800 Subject: [PATCH] Not showing the div.help-block when there is no help text --- bootstrapform/templates/bootstrapform/form.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bootstrapform/templates/bootstrapform/form.html b/bootstrapform/templates/bootstrapform/form.html index 99a8ba4..c38480b 100644 --- a/bootstrapform/templates/bootstrapform/form.html +++ b/bootstrapform/templates/bootstrapform/form.html @@ -15,9 +15,13 @@ + + {% if field.help_text %} {{ field.help_text }} + {% endif %} + {% for error in field.errors %} {{ error }} {% endfor %} @@ -28,14 +32,16 @@ {{ field.label_tag }}
{{ field }} + + {% if field.help_text %} - {{ field.help_text }} + {{ field.help_text }} - {% if field.errors %} - {% for error in field.errors %} - {{ error }} - {% endfor %} {% endif %} + + {% for error in field.errors %} + {{ error }} + {% endfor %}
{% endif %}