Fix saving the Gravatar configuration form.

Review Request #13891 — Created May 22, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

Modern browsers were failing to save the avatars configuration form when
Gravatars were set. When hitting Save, the browser was iterating through
all fields and trying to save their states. The file upload field was
empty, and unfocusable due to being hidden, and this caused modern
browsers to bail on the whole save process.

We now use the approach we use in more modern forms in Review Board,
where we ensure that any subform is a <fieldset> that we can manage
via disabled and hidden states. This will prevent the browser from
trying to save anything in it, restoring functionality.

Verified I could save the File Upload form and the Gravatar form
independently, and that the browser only attempted to send fields from
the respective fieldset.

Unit tests pass.

Commits

Files