18 lines
782 B
HTML
18 lines
782 B
HTML
{% for error in form.non_field_errors %}<article class="message error">{{ error }}</article>{% endfor %}
|
|
<form method="post" {% if action %}action="{% url action %}"{% endif %}>
|
|
{% csrf_token %}
|
|
{% for field in form %}
|
|
<fieldset>
|
|
{% if field.id_for_label %}
|
|
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
|
{% else %}
|
|
<legend>{{ field.label }}</legend>
|
|
{% endif %}
|
|
{{ field }}
|
|
{% if field.errors %}
|
|
<small id="{{ field.errors.field_id }}_error" class="form-error">{{ field.errors|join:", " }}</small>
|
|
{% endif %}
|
|
</fieldset>
|
|
{% endfor %}
|
|
<input type="submit" {% if submit %}value="{{ submit }}"{% endif %}>
|
|
</form>
|