{% load i18n verbose_name_tags %}
{% if has_non_field_errors %}
<div class="form-errors alert alert-box alert-block alert-error fade in">
  <a class="close" data-dismiss="alert" href="#">&times;</a>

  <h4 class="alert-heading">
    {% trans "Please correct the following form errors:" %}
  </h4>

  {% for form in forms %}
    {% if form.non_field_errors %}
      {% for error in form.non_field_errors %}{{ error }}<br>{% endfor %}
    {% endif %}
  {% endfor %}

  {% for formset in formsets %}
    {% if formset.non_field_errors %}
      {% for error in formset.non_field_errors %}{{ error }}<br>{% endfor %}
    {% endif %}
    {% for form in formset %}
      {% if form.non_field_errors %}
        {% for error in form.non_field_errors %}{{ error }}<br>{% endfor %}
      {% endif %}
    {% endfor %}
  {% endfor %}
</div>
{% endif %}
