• 
      

    Fix using admin widgets in non-ModelAdmin change forms.

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

    Information

    Review Board
    release-4.0.x

    Reviewers

    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.

    Commits

    Files