2014-05-19 21:08:07 +02:00
|
|
|
{{ form.media }}
|
2013-05-16 23:29:01 +02:00
|
|
|
{% if form.non_field_errors %}
|
2015-01-17 13:31:06 +01:00
|
|
|
<div class="alert alert-danger" role="alert">
|
2013-05-16 23:29:01 +02:00
|
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
|
|
{% for msg in form.non_field_errors %}
|
|
|
|
{{ msg }}
|
|
|
|
{% if not forloop.last %}<br />{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2012-09-06 22:41:24 +02:00
|
|
|
{% for field in form %}
|
2015-01-17 13:31:06 +01:00
|
|
|
<div class="form-group {% if field.errors %}error{% endif%}">
|
2012-09-06 22:41:24 +02:00
|
|
|
<label for="id_{{ field.name }}">{{ field.label }}{% if field.field.required %}<span class="required">*</span>{% endif %}:</label>
|
|
|
|
{{ field }}
|
|
|
|
{% if field.errors %}
|
|
|
|
<span class="help-inline">{{ field.errors }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if field.help_text %}
|
|
|
|
<span class="help-inline">{{ field.help_text }}</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|