Support orderable mutiple choice field
Goal: customize Django's MultipleChoiceField to support intactively change the order of the selected options.
Use Case: when launching an VM instance user can select multiple networks and specify their order/priority to attach.
For example:
network = forms.MultipleC
widget=
==> network = forms.Orderable
widget=
network = forms.MultipleC
widget=
==> network = forms.Orderable
widget=
Blueprint information
- Status:
- Complete
- Approver:
- Gabriel Hurley
- Priority:
- Not
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Gabriel Hurley
Related branches
Related bugs
Sprints
Whiteboard
Google searches revealed relatively little in terms of an off-the-shelf orderable multiple choice field that we can use. As such, here are some thoughts on implementation:
Pull in select pieces of jQuery UI's sortable and drag/drop libraries; using those it should be relatively straight-forward to take a standard <select> list and hide it behind an interface that the user can reorder. You 'll use javascript to reorder to <select> element (hidden) to apply the correct order to it. Then when it's submitted to the backend you'll have access to the port IDs in the correct ordering.
See here: http://
[gabriel] I'm going to simply mark this as superseded by https:/