Add RepositoryForm for tracking repository config options and state.

Review Request #12754 — Created Dec. 9, 2022 and updated — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This introduces RepositoryForm, which is now created when
instantiating the repository configuration page. This parses model state
from the server-side form, creating collections of SCMTool, hosting
service, and account options for configuration.

This will soon contain logic and additional configuration state, for the
purpose of creating a more dynamic client-side-driven repository
configuration experience.

For now, little has changed, except some global variables
(HOSTING_SERVICES and TOOLS_INFO) and some stored state from the DOM
(the list of original SCMTools) have been updated to use the new form
model capabilities.

There's also some code removed for disabling form inputs when showing a
SSL cert or SSH key confirmation. This hasn't worked since Review Board
3, and this will all be replaced in time anyway. This code existed in a
file that's now being removed, so for now, it's just going away.

Repository form code now lives in the main "admin" bundle, and unit
tests have been added for the form model.

Unit tests passed.

Tested that repository form loading worked, and that all operations that
query hosting service information or tools and update configuration all
behave as normal.

Commits

Files