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:
parent
230d8c7301
commit
1745aa000a
|
@ -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 %} <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 %}
|
||||
|
|
Loading…
Reference in New Issue