Fix using admin widgets in non-ModelAdmin change forms.
Review Request #10957 — Created March 13, 2020 and submitted
With the new admin UI, only change forms based on
ModelAdminended up
having special widgets (likeSelectFilter) set up. The form media
wasn't being referenced (since we were assuming it'd be passed to the
form as themediavariable, which isn't true on normal forms) and we
weren't initializing them properly anyway.We now check for both
mediaandform.media, covering both cases, and
we initialize these widgets inRB.FormView. The latter also now houses
the logic for re-initializing these widgets, moving the functionality
out ofRB.Admin.InlineFormGroupViewand simplifying form management.
Tested various form pages with these widgets, making sure they worked
as expected.
| Summary | ID |
|---|---|
| 6b44742125ec38b5f2ff3824395284b901589df2 |