summaryrefslogtreecommitdiff
path: root/django/contrib/admin/templates
diff options
context:
space:
mode:
authorantoliny0919 <antoliny0919@gmail.com>2025-01-07 20:22:30 +0900
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-02-04 07:56:23 +0000
commit1330cb570519170bb4397b4fb02c7e3e0657855a (patch)
treef4162e916813072aa64412015fbdf7d7d876f453 /django/contrib/admin/templates
parentb1324a680add78de24c763911d0eefa19b9263bc (diff)
Fixed #36069 -- Fixed the delete button position in TabularInlines.
Diffstat (limited to 'django/contrib/admin/templates')
-rw-r--r--django/contrib/admin/templates/admin/edit_inline/tabular.html6
1 files changed, 2 insertions, 4 deletions
diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html
index 7acfda7bd1..9367ac9b63 100644
--- a/django/contrib/admin/templates/admin/edit_inline/tabular.html
+++ b/django/contrib/admin/templates/admin/edit_inline/tabular.html
@@ -23,7 +23,7 @@
{% if field.help_text %}<img src="{% static "admin/img/icon-unknown.svg" %}" class="help help-tooltip" width="10" height="10" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}">{% endif %}
</th>
{% endfor %}
- {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}<th>{% translate "Delete?" %}</th>{% endif %}
+ <th>{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}{% translate "Delete?" %}{% endif %}</th>
</tr></thead>
<tbody>
@@ -58,9 +58,7 @@
{% endfor %}
{% endfor %}
{% endfor %}
- {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
- <td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>
- {% endif %}
+ <td class="delete">{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>