Fixed #33930 -- Eased customization of delete_confirmation.html template in the admin.
This commit is contained in:
parent
e3cb8bcb7d
commit
aed60aee38
|
@ -21,16 +21,21 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if perms_lacking %}
|
{% if perms_lacking %}
|
||||||
|
{% block delete_forbidden %}
|
||||||
<p>{% blocktranslate 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:{% endblocktranslate %}</p>
|
<p>{% blocktranslate 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:{% endblocktranslate %}</p>
|
||||||
<ul>{{ perms_lacking|unordered_list }}</ul>
|
<ul id="deleted-objects">{{ perms_lacking|unordered_list }}</ul>
|
||||||
|
{% endblock %}
|
||||||
{% elif protected %}
|
{% elif protected %}
|
||||||
|
{% block delete_protected %}
|
||||||
<p>{% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktranslate %}</p>
|
<p>{% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktranslate %}</p>
|
||||||
<ul>{{ protected|unordered_list }}</ul>
|
<ul id="deleted-objects">{{ protected|unordered_list }}</ul>
|
||||||
|
{% endblock %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
{% block delete_confirm %}
|
||||||
<p>{% blocktranslate 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:{% endblocktranslate %}</p>
|
<p>{% blocktranslate 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:{% endblocktranslate %}</p>
|
||||||
{% include "admin/includes/object_delete_summary.html" %}
|
{% include "admin/includes/object_delete_summary.html" %}
|
||||||
<h2>{% translate "Objects" %}</h2>
|
<h2>{% translate "Objects" %}</h2>
|
||||||
<ul>{{ deleted_objects|unordered_list }}</ul>
|
<ul id="deleted-objects">{{ deleted_objects|unordered_list }}</ul>
|
||||||
<form method="post">{% csrf_token %}
|
<form method="post">{% csrf_token %}
|
||||||
<div>
|
<div>
|
||||||
<input type="hidden" name="post" value="yes">
|
<input type="hidden" name="post" value="yes">
|
||||||
|
@ -40,5 +45,6 @@
|
||||||
<a href="#" class="button cancel-link">{% translate "No, take me back" %}</a>
|
<a href="#" class="button cancel-link">{% translate "No, take me back" %}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
{% endblock %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
|
@ -39,6 +39,10 @@ Minor features
|
||||||
downloading fonts. Additionally, CSS variables are available to more easily
|
downloading fonts. Additionally, CSS variables are available to more easily
|
||||||
override the default font families.
|
override the default font families.
|
||||||
|
|
||||||
|
* The :source:`admin/delete_confirmation.html
|
||||||
|
<django/contrib/admin/templates/admin/delete_confirmation.html>` template now
|
||||||
|
has some additional blocks and scripting hooks to ease customization.
|
||||||
|
|
||||||
:mod:`django.contrib.admindocs`
|
:mod:`django.contrib.admindocs`
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue