You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -49,9 +51,17 @@ <h3 class="{% if not inline_opts.sortable_options or not inline_opts.sortable_op
49
51
</ul>
50
52
{% endif %}
51
53
54
+
{% if "5.1"|django_version_gte %}
55
+
{% with parent_counter=forloop.counter0 %}
56
+
{% for fieldset in inline_admin_form %}
57
+
{% include inline_admin_formset.opts.fieldset_template with heading_level=4 id_prefix=parent_counter id_suffix=forloop.counter0 %}
58
+
{% endfor %}
59
+
{% endwith %}
60
+
{% else %}
52
61
{% for fieldset in inline_admin_form %}
53
62
{% include inline_admin_formset.opts.fieldset_template %}
54
63
{% endfor %}
64
+
{% endif %}
55
65
{% if inline_admin_form.has_auto_field or inline_admin_form.needs_explicit_pk_field %}
56
66
{{ inline_admin_form.pk_field.field }}
57
67
{% endif %}
@@ -71,6 +81,7 @@ <h3 class="{% if not inline_opts.sortable_options or not inline_opts.sortable_op
71
81
{% blocktrans with inline_admin_formset.opts.verbose_name|strip_parent_name:inline_opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %}
72
82
</a>
73
83
</div>
84
+
{% if inline_admin_formset.is_collapsible %}</details>{% endif %}
0 commit comments