diff options
Diffstat (limited to 'ishtar_common/templates/blocks/inline_formset.html')
-rw-r--r-- | ishtar_common/templates/blocks/inline_formset.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ishtar_common/templates/blocks/inline_formset.html b/ishtar_common/templates/blocks/inline_formset.html index 37be0f005..f7e18ba2b 100644 --- a/ishtar_common/templates/blocks/inline_formset.html +++ b/ishtar_common/templates/blocks/inline_formset.html @@ -3,11 +3,18 @@ {% if header %}<table class='inline-table' id='{{formset.prefix}}'> <caption>{% trans caption %}</caption> <thead> - <tr>{% for field in formset.0.visible_fields%} + <tr>{% for field in formset.0.visible_fields %} <th>{{field.label}}</th>{%endfor%} </tr> </thead>{% endif %}{% for frm in formset%} {% if forloop.first and not skip %}<tbody>{%endif%} + {% if frm.non_field_errors %} + <tr class="errors"> + <td colspan="{{formset.0.visible_fields|length}}"> + {{frm.non_field_errors.as_ul}} + </td> + </tr> + {% endif %} {% if not skip or not forloop.first %} <tr>{% endif %}{% for field in frm.visible_fields %}<td> {% if field.errors %}<div class='errors'>{{ field.errors.as_ul }}</div>{% endif %} |