Allow single- or multi-valued selections with the RelatedUserWidget
Review Request #8986 — Created June 2, 2017 and submitted — Latest diff uploaded
The
RelatedUserWidget
now supports selecting either a single value
(new behaviour) or multiple values (old behaviour & the default) through
a new parameter. When in single-valued mode, the widget will be rendered
without the list of item selections and will use selectize.js's renderd
<select>
as the only selected item. When in multi-valued mode, the
widget will be rendered as before.
- Used this with an upcoming patch for the OAuth form.
- Tested the user selector on the repository admin form and ensured
that multi-valued selections still work.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.
orig
1
2
3
4
5
reviewboard/admin/form_widgets.py |
---|
reviewboard/static/rb/js/admin/views/relatedObjectSelectorView.es6.js |
---|
reviewboard/static/rb/js/admin/views/relatedUserSelectorView.es6.js |
---|
reviewboard/templates/admin/related_user_widget.html |
---|