-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add non-form & non-field errors to templates
- Loading branch information
1 parent
ad55e14
commit cd03d49
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{# Render any non-field form errors as a table row #} | ||
{% if form.non_field_errors %} | ||
<tr class="form-errors"> | ||
<td colspan="{% if colspan %}{{ colspan }}{% else %}{{ form.fields|length }}{% endif %}"> | ||
{% if form_error_title %}<h5>{{ form_error_title }}</h5>{% endif %} | ||
<ul> | ||
{{ form.non_field_errors|unordered_list }} | ||
</ul> | ||
</td> | ||
</tr> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters