33 lines
1.0 KiB
HTML
33 lines
1.0 KiB
HTML
{% for hidden in form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
{% if form.warnings %}
|
|
<div class="alert alert-message alert-warning">
|
|
{{ form.warnings }}
|
|
</div>
|
|
{% endif %}
|
|
{% if form.non_field_errors %}
|
|
<div class="alert alert-message alert-error">
|
|
{{ form.non_field_errors }}
|
|
</div>
|
|
{% endif %}
|
|
{% for field in form.visible_fields %}
|
|
<div class="control-group form-field clearfix{% if field.errors %} error{% endif %} {{ field.css_classes }}">
|
|
{{ field.label_tag }}
|
|
{% if field.errors %}
|
|
{% for error in field.errors %}
|
|
<span class="help-inline">{{ error }}</span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% comment %}
|
|
Escape help_text a second time here, to avoid an XSS issue in bootstrap.js.
|
|
This can most likely be removed once we upgrade bootstrap.js past 2.0.2.
|
|
Note: the spaces are necessary here.
|
|
{% endcomment %}
|
|
<span class="help-block">{% filter force_escape %} {{ field.help_text }} {% endfilter %} </span>
|
|
<div class="input">
|
|
{{ field }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|