mirror of
https://github.com/Hopiu/django.git
synced 2026-05-12 01:23:09 +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:
parent
230d8c7301
commit
1745aa000a
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue