Allow ConfigForms to use fieldsets.

Review Request #9045 — Created June 29, 2017 and submitted

David Trowbridge

This change updates things so that if a ConfigForm has fieldsets, they'll be
rendered correctly (as opposed to just having all the fields rendered together
as if the fieldsets didn't exist).

This has one small niggle in that if a person defines their own fieldsets, one
of those fieldsets must contain the form_target field. I've added a log
statement to help people figure out what went wrong if they didn't include

Testing done:
- Ran unit tests.
- Used this in conjunction with a Review Board change.

  • Ran unit tests.
  • Used this in conjunction with a Review Board change.
  • 0
  • 0
  • 6
  • 0
  • 6
Description From Last Updated
Christian Hammond
  2. djblets/configforms/templates/configforms/config_page_form.html (Diff revision 1)

    I don't really love duplicating all this. How about introducing a djblets/forms/templates/form_fieldset.html that works as a base for this and the admin one? It could take a extra_fieldset_classes variable that the admin one can pass down for module aligned, along with a template name that can be passed for the field name.

    Similarly, we could have a base for the form_field.html.

    We used to have a lot of copies of these rules, which was painful to clean up, so I'm hoping to keep it as tidy and consistent as possible.

  3. The class= should probably be within the if {% fieldset.classes %}.

  4. djblets/configforms/ (Diff revision 1)

    Can you pass the request?

  5. Alphabetical order.

David Trowbridge
Barret Rennie
  2. djblets/configforms/ (Diff revision 2)

    We should use a module-level logger here.

David Trowbridge
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (215bbc2)