Skip to content

Commit

Permalink
Not showing the div.help-block when there is no help text
Browse files Browse the repository at this point in the history
  • Loading branch information
tzangms committed Nov 21, 2011
1 parent 6007701 commit cb87f07
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions bootstrapform/templates/bootstrapform/form.html
Expand Up @@ -15,9 +15,13 @@
<label>
{{ field }} <span>{{ field.label }}</span>
</label>

{% if field.help_text %}
<span class="help-block">
{{ field.help_text }}
</span>
{% endif %}

{% for error in field.errors %}
<span class="help-inline">{{ error }}</span>
{% endfor %}
Expand All @@ -28,14 +32,16 @@
{{ field.label_tag }}
<div class="input">
{{ field }}

{% if field.help_text %}
<span class="help-block">
{{ field.help_text }}
{{ field.help_text }}
</span>
{% if field.errors %}
{% for error in field.errors %}
<span class="help-inline">{{ error }}</span>
{% endfor %}
{% endif %}

{% for error in field.errors %}
<span class="help-inline">{{ error }}</span>
{% endfor %}
</div>
{% endif %}
</div>
Expand Down

0 comments on commit cb87f07

Please sign in to comment.