Fix fieldset classes for settings forms.

Review Request #14686 — Created Nov. 11, 2025 and submitted — Latest diff uploaded

Information

Review Board
release-7.1.x

Reviewers

In admin model forms, the change_form_fieldsets templatetag will
instantiate an adapter object to convert django's builtin class names
(like 'wide') to our form CSS class names ('-is-wide').

For settings forms, the template doesn't (and really can't) use that
templatetag, since a settings form is different from an adminform. In
these cases we were still using the django class names, which resulted
in using 'wide' as the class name, which wasn't correct.

This change makes our djblets_forms fieldset template check for the
'wide' class, and add '-is-wide' if found.

Viewed settings forms in the admin and saw that fieldsets now had the
correct class name, and that we now had a match between the label widths
in regular fieldsets and in subforms (which go through slightly
different templates, ugh).

Commits

Files