<!--
SPDX-FileCopyrightText: 2024-present Tobias Kunze
SPDX-License-Identifier: AGPL-3.0-only WITH LicenseRef-Pretalx-AGPL-3.0-Terms
-->

{% load phrases %}
{% if form.non_field_errors or form.errors %}
  <div class="alert alert-danger" role="alert">
    <div>
      {% if form.non_field_errors %}
        {% if form.non_field_errors|length > 1 %}
          <ul>
            {% for error in form.non_field_errors %}
              <li>{{ error }}</li>
            {% endfor %}
          </ul>
        {% else %}
          {{ form.non_field_errors.0 }}
        {% endif %}
      {% else %}
        {{ phrases.base.error_saving_changes }}
      {% endif %}
    </div>
  </div>
{% endif %}
