Fix using admin widgets in non-ModelAdmin change forms.
Review Request #10957 — Created March 14, 2020 and submitted
With the new admin UI, only change forms based on
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
mediavariable, which isn't true on normal forms) and we
weren't initializing them properly anyway.
We now check for both
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
RB.Admin.InlineFormGroupViewand simplifying form management.
Tested various form pages with these widgets, making sure they worked