Fix using admin widgets in non-ModelAdmin change forms.

Review Request #10957 — Created March 13, 2020 and submitted

chipx86
Review Board
release-4.0.x
reviewboard

With the new admin UI, only change forms based on ModelAdmin ended up
having special widgets (like SelectFilter) set up. The form media
wasn't being referenced (since we were assuming it'd be passed to the
form as the media variable, which isn't true on normal forms) and we
weren't initializing them properly anyway.

We now check for both media and form.media, covering both cases, and
we initialize these widgets in RB.FormView. The latter also now houses
the logic for re-initializing these widgets, moving the functionality
out of RB.Admin.InlineFormGroupView and simplifying form management.

Tested various form pages with these widgets, making sure they worked
as expected.

Summary
Fix using admin widgets in non-ModelAdmin change forms.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (8918962)
Loading...