Added non_field.errors in form.html.
This commit is contained in:
parent
bf58f2a6cc
commit
eedc79ca8f
@ -24,7 +24,6 @@
|
||||
</h1>
|
||||
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% include "form.html" %}
|
||||
{% if edit_user %}
|
||||
<p style="margin: -15px 0 25px 0;">
|
||||
|
@ -1,3 +1,12 @@
|
||||
{% if form.non_field_errors %}
|
||||
<div class="alert alert-error">
|
||||
<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 %}
|
||||
{% for field in form %}
|
||||
<div class="control-group {% if field.errors %}error{% endif%}">
|
||||
<label for="id_{{ field.name }}">{{ field.label }}{% if field.field.required %}<span class="required">*</span>{% endif %}:</label>
|
||||
|
Loading…
Reference in New Issue
Block a user