From 1745aa000a4e859c21270371662634978371dda8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 19 Oct 2015 19:56:47 +0200 Subject: [PATCH] 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. --- django/contrib/admin/templates/admin/edit_inline/tabular.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }} + {% for field in inline_admin_formset.fields %} {% if not field.widget.is_hidden %} - {{ field.label|capfirst }} + {{ field.label|capfirst }} {% if field.help_text %} ({{ field.help_text|striptags }}){% endif %} {% endif %}