Fix saving the Gravatar configuration form.

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

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.

Summary ID
Fix saving the Gravatar configuration form.
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.
73f145b485cbb3755b47a3690b06e678a371ef5a
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (d207e59)