Not showing the div.help-block when there is no help text

This commit is contained in:
tzangms
2011-11-22 00:36:59 +08:00
parent 600770191a
commit cb87f07096

View File

@@ -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 %}
@@ -28,14 +32,16 @@
{{ field.label_tag }}
<div class="input">
{{ field }}
{% if field.help_text %}
<span class="help-block">
{{ field.help_text }}
</span>
{% if field.errors %}
{% endif %}
{% for error in field.errors %}
<span class="help-inline">{{ error }}</span>
{% endfor %}
{% endif %}
</div>
{% endif %}
</div>