Resolve #441: Improve relationship party selection widget #542
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes in this pull request
SelectPartyWidget
widget to output<select>
instead of<table>
.NewEntityWidget
widget to show the "Add party" button as a button instead of as a link, and to make the button text translatable.<select>
tag, and to make the widget<label>
s translatable.Screenshots
Default view of the "Add New Relationship" modal showing the Select2 in action.
When the select box is clicked, we get a nice list of parties with their names and types shown. This can be easily updated in the future to include as many party attributes as needed.
Clicking on a party locks that selection in.
Clicking on the "Add party" button allows us to create a new party instead. This is the same as the previous behavior.
When there are more than 5—this is customizable—parties in the project, the Select2 widget displays a search box that can filter the parties that can be selected.
When should this PR be merged
It would be nice if @clash99 can take a look and see if the updated widget is up to the task. Alternatively, this can be merged now and then updated in the future.
Risks
No risks foreseen
Follow up actions
None.