summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2015-10-19 19:56:47 +0200
committerTim Graham <timograham@gmail.com>2015-10-21 10:21:23 -0400
commit1745aa000a4e859c21270371662634978371dda8 (patch)
tree0613f7294e3440d4811ea14409cd1efd6933701d
parent230d8c7301281176a31443a2f4f425828291e46d (diff)
Fixed #25586 -- Fixed possible table cell misalignment in admin's tabular inlines.
The table body (tbody) was shifted by one column to the left if the first inline form field is hidden.
-rw-r--r--django/contrib/admin/templates/admin/edit_inline/tabular.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html
index 682ea4d57e..a5a4eb3deb 100644
--- a/django/contrib/admin/templates/admin/edit_inline/tabular.html
+++ b/django/contrib/admin/templates/admin/edit_inline/tabular.html
@@ -7,9 +7,10 @@
{{ inline_admin_formset.formset.non_form_errors }}
<table>
<thead><tr>
+ <th class="original"></th>
{% for field in inline_admin_formset.fields %}
{% if not field.widget.is_hidden %}
- <th{% if forloop.first %} colspan="2"{% endif %}{% if field.required %} class="required"{% endif %}>{{ field.label|capfirst }}
+ <th{% if field.required %} class="required"{% endif %}>{{ field.label|capfirst }}
{% if field.help_text %}&nbsp;<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>
{% endif %}