Skip to content

Commit ffe1be4

Browse files
authored
fix: changeform messages spacing (#1527)
1 parent a93d9c7 commit ffe1be4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/unfold/templates/admin/change_form.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@
5252
<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">
5353
{% endif %}
5454

55-
{% include "unfold/helpers/messages/errornote.html" with errors=errors %}
56-
{% include "unfold/helpers/messages/error.html" with errors=adminform.form.non_field_errors %}
55+
{% if errors or adminform.form.non_field_errors %}
56+
<div class="flex flex-col gap-4 *:mb-0">
57+
{% include "unfold/helpers/messages/errornote.html" with errors=errors %}
58+
{% include "unfold/helpers/messages/error.html" with errors=adminform.form.non_field_errors %}
59+
</div>
60+
{% endif %}
5761

5862
{% block field_sets %}
5963
{% with has_conditional_display=adminform.model_admin.conditional_fields %}

0 commit comments

Comments
 (0)