From b7b5465b1c026dda7de646fca15ca1e97886d021 Mon Sep 17 00:00:00 2001 From: Johannes Maron Date: Sat, 27 Dec 2025 12:28:26 +0100 Subject: [6.0.x] Fixed #36829 -- Reverted value of ClearableFileInput.use_fieldset to True. There was unresolved discussion regarding whether to set ClearableFileInput.use_fieldset to True or False when use_fieldset was introduced in Django 4.1, since the clear checkbox appears only sometimes. Although using
is likely desirable, since the primary motivation in #35892 was just to improve markup in the admin, and a deprecation path was not provided for general form usage, future work is deferred to #36828. Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95. Thanks Tim Graham, Antoliny, and David Smith for triage. --- tests/forms_tests/widget_tests/test_clearablefileinput.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests/forms_tests') diff --git a/tests/forms_tests/widget_tests/test_clearablefileinput.py b/tests/forms_tests/widget_tests/test_clearablefileinput.py index 8d3bff4b45..ae54cc4b5d 100644 --- a/tests/forms_tests/widget_tests/test_clearablefileinput.py +++ b/tests/forms_tests/widget_tests/test_clearablefileinput.py @@ -246,19 +246,18 @@ class ClearableFileInputTest(WidgetTest): ) form = TestForm() - self.assertIs(self.widget.use_fieldset, True) + self.assertIs(self.widget.use_fieldset, False) self.assertHTMLEqual( - '
Field:' - '
' - '
With file:Currently: ' + '
' + '
' + '
Currently: ' 'something
Change:
' - '
Clearable file:' + 'name="with_file" id="id_with_file">
' + '
' 'Currently: something' '
Change:' - '' - "
", + '', form.render(), ) -- cgit v1.3