Commit 3687aa00 authored by areski's avatar areski Committed by Tim Graham
Browse files

Simplified admin delete confirmation templates using {% elif %}.

Thanks jonash for the initial patch; refs #20133.
parent d38a0033
Loading
Loading
Loading
Loading
+14 −17
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
{% endblock %}

{% block content %}
{% if perms_lacking or protected %}
{% if perms_lacking %}
    <p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
    <ul>
@@ -22,15 +21,13 @@
        <li>{{ obj }}</li>
    {% endfor %}
    </ul>
    {% endif %}
    {% if protected %}
{% elif protected %}
    <p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}</p>
    <ul>
    {% for obj in protected %}
        <li>{{ obj }}</li>
    {% endfor %}
    </ul>
    {% endif %}
{% else %}
    <p>{% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
    <ul>{{ deleted_objects|unordered_list }}</ul>
+14 −17
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
{% endblock %}

{% block content %}
{% if perms_lacking or protected %}
{% if perms_lacking %}
    <p>{% blocktrans %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
    <ul>
@@ -21,15 +20,13 @@
        <li>{{ obj }}</li>
    {% endfor %}
    </ul>
    {% endif %}
    {% if protected %}
{% elif protected %}
    <p>{% blocktrans %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktrans %}</p>
    <ul>
    {% for obj in protected %}
        <li>{{ obj }}</li>
    {% endfor %}
    </ul>
    {% endif %}
{% else %}
    <p>{% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}</p>
    {% for deletable_object in deletable_objects %}