51 lines
1.4 KiB
HTML
51 lines
1.4 KiB
HTML
{% load bootstrap %}
|
|
|
|
{{ form.non_field_errors }}
|
|
|
|
{% for field in form.hidden_fields %}
|
|
{{ field }}
|
|
{% endfor %}
|
|
|
|
{% for field in form.visible_fields %}
|
|
<div class="clearfix{% if field.errors %} error{% endif %}">
|
|
{% if field|is_checkbox %}
|
|
<ul class="inputs-list">
|
|
<li>
|
|
<div class="input">
|
|
<label>
|
|
{{ field }} <span>{{ field.label }}</span>
|
|
</label>
|
|
|
|
{% for error in field.errors %}
|
|
<span class="help-inline">{{ error }}</span>
|
|
{% endfor %}
|
|
|
|
{% if field.help_text %}
|
|
<span class="help-block">
|
|
{{ field.help_text }}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
{% else %}
|
|
{{ field.label_tag }}
|
|
<div class="input">
|
|
{{ field }}
|
|
|
|
{% for error in field.errors %}
|
|
<span class="help-inline">{{ error }}</span>
|
|
{% endfor %}
|
|
|
|
{% if field.help_text %}
|
|
<span class="help-block">
|
|
{{ field.help_text }}
|
|
</span>
|
|
{% endif %}
|
|
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
|