{% extends "form_view.html" %} {% load i18n %} {% block before_form %} {% comment %} An alert lays its direct children out as columns, so everything each one says goes inside a single element. Splitting a sentence around a puts each fragment in a column of its own and spreads it across the width. {% endcomment %} {% if is_protected %}
{% trans "This record cannot be deleted." %} {% trans "It is referenced by the following records, which must be removed or updated first:" %}
    {% for obj in protected_objects %}
  • {{ obj }}
  • {% endfor %}
{% else %} {% blocktrans %}You are about to permanently delete this record. This action cannot be undone.{% endblocktrans %} {% if related_objects %}
{% trans "The following related records will also be permanently deleted:" %} {% for label, objs, overflow in related_objects %}
    {% for obj in objs %}
  • {{ obj }}
  • {% endfor %}
{% if overflow %} {% blocktrans %}… and {{ overflow }} more{% endblocktrans %} {% endif %} {% endfor %}
{% endif %} {% if require_confirmation %} {% comment %} No input drawn here: it's the form's own bound field inside
below. A second one here shared its name/id, so typing landed on the wrong element and the posted, validated field stayed empty. {% endcomment %} {% blocktrans with val=confirmation_value %}To confirm, type {{ val }} below:{% endblocktrans %} {% endif %} {% endif %} {% endblock before_form %} {% block actions %} {% if back_url %} {% endif %} {% if not is_protected %} {% if require_confirmation %} {% else %} {% endif %} {% endif %} {% endblock actions %} {% block extra_js %} {% if require_confirmation %} {% endif %} {% endblock extra_js %}