1
0
mirror of https://github.com/django/django.git synced 2025-03-06 07:22:32 +00:00

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.
This commit is contained in:
Daniel Hahler 2015-10-19 19:56:47 +02:00 committed by Tim Graham
parent 230d8c7301
commit 1745aa000a

View File

@ -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 %}