diff --git a/crispy_bootstrap5/templates/bootstrap5/layout/formactions.html b/crispy_bootstrap5/templates/bootstrap5/layout/formactions.html index 6daaa07..3b1072e 100644 --- a/crispy_bootstrap5/templates/bootstrap5/layout/formactions.html +++ b/crispy_bootstrap5/templates/bootstrap5/layout/formactions.html @@ -1,6 +1,6 @@ <div {% if formactions.flat_attrs %}{{ formactions.flat_attrs }}{% endif %} - class="mb-3{% if 'form-horizontal' in form_class %} row{% endif %} {{ formactions.css_class|default:'' }} {{ field_class }}" + class="mb-3{% if 'form-horizontal' in form_class %} row{% endif %} {{ formactions.css_class|default:'' }}" {% if formactions.id %} id="{{ formactions.id }}"{% endif %}> {% if label_class %} <div class="aab {{ label_class }}"></div> diff --git a/tests/results/test_formactions.html b/tests/results/test_formactions.html index e9c294c..24928f3 100644 --- a/tests/results/test_formactions.html +++ b/tests/results/test_formactions.html @@ -1,6 +1,6 @@ <div test="formactions-test" - class="mb-3 formactions-test-class field-class" + class="mb-3 formactions-test-class" id="formactions-test-id"> <div class="field-class"> <b>test</b> diff --git a/tests/test_layout_objects.py b/tests/test_layout_objects.py index 6eec8de..1554bcb 100644 --- a/tests/test_layout_objects.py +++ b/tests/test_layout_objects.py @@ -663,7 +663,7 @@ def test_formactions(self): ), ) - assert 'class="mb-3 "' in render_crispy_form(test_form) + assert 'class="mb-3 "' in render_crispy_form(test_form) def test_formactions_attrs(self): test_form = SampleForm() @@ -693,5 +693,5 @@ def test_formactions_horizontal_form(self): ), ) - expected_class = 'class="mb-3 row formactions-test-class "' + expected_class = 'class="mb-3 row formactions-test-class"' assert expected_class in render_crispy_form(test_form)