Add front-end support for inline forms and the change form in the admin UI.

Review Request #10826 — Created Jan. 15, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

The administration UI's Change Form, which is responsible for adding or
modifying objects in the database, is complex and has a lot of custom
JavaScript that can be fragile when we update our version of Django and
can interact poorly with our own logic and styling.

This change introduces the beginning of a view for managing the Change
Form, which currently just sets up the biggest part of this change, the
new Inline Forms classes.

Inline Forms are a Django admin UI concept that makes it easy to add or
modify related objects all in the same Change Form page.

This change provides custom code for managing these forms, allowing us
to control any initialization of form elements, maintain styles that
won't conflict with other parts of the page (unlike current inline
support), and check for regressions through unit tests.

This is a big chunk of the client-side work for this page, which is why
we're starting here. Upcoming changes will improve upon the styling and
component structure of the page.

JavaScript unit tests pass.

Tested the inline forms on several different models, verifying that
adding and removing work as expected and that state on the forms are
correct.

Commits

Files

    Loading...