Skip to content

Commit

Permalink
fix: inlines sorting missing attribute (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav authored Nov 11, 2024
1 parent b80a5f4 commit 9d70b91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/unfold/templates/admin/edit_inline/stacked.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 class="bg-gray-100 border border-transparent font-semibold mb-6 px-4 py-3 ro
{% endif %}>

{% for inline_admin_form in inline_admin_formset %}
<div class="inline-related group inline-stacked {% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}" {% if inline_admin_form.original %}x-sort:item{% endif %}>
<div x-sort:item class="inline-related group inline-stacked {% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">
{% if not inline_admin_formset.opts.hide_title or inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
<h3 class="bg-gray-50 border-b border-gray-200 flex font-medium items-center gap-2 mb-3 px-3 py-2 text-sm dark:bg-white/[.02] dark:border-gray-800">
{% if inline_admin_formset.opts.ordering_field %}
Expand Down
2 changes: 1 addition & 1 deletion src/unfold/templates/admin/edit_inline/tabular.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h2 class="bg-gray-100 border border-transparent font-semibold mb-6 px-4 py-3 ro
</thead>

{% for inline_admin_form in inline_admin_formset %}
<tbody {% if inline_admin_form.original %}x-sort:item{% endif %}>
<tbody x-sort:item>
{% if inline_admin_form.form.non_field_errors %}
<tr class="row-form-errors group inline-tabular">
<td colspan="{{ inline_admin_form|cell_count }}">
Expand Down

0 comments on commit 9d70b91

Please sign in to comment.