diff options
| author | antoliny0919 <antoliny0919@gmail.com> | 2025-01-07 20:22:30 +0900 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-02-04 07:56:23 +0000 |
| commit | 1330cb570519170bb4397b4fb02c7e3e0657855a (patch) | |
| tree | f4162e916813072aa64412015fbdf7d7d876f453 /django/contrib/admin/templates | |
| parent | b1324a680add78de24c763911d0eefa19b9263bc (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.html | 6 |
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> |
