Support orderable mutiple choice field

Registered by Edward

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.MultipleChoiceField(label=_("Networks"),
   widget=forms.CheckboxSelectMultiple())

==> network = forms.OrderableMultipleChoiceField(label=_("Networks"),
   widget=forms.CheckboxSelectMultiple())

network = forms.MultipleChoiceField(label=_("Networks"),
   widget=forms.SelectMultiple())

==> network = forms.OrderableMultipleChoiceField(label=_("Networks"),
   widget=forms.SelectMultiple())

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
Completed by
Gabriel Hurley

Related branches

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://jsfiddle.net/AJzMh/ for a working concept.

[gabriel] I'm going to simply mark this as superseded by https://blueprints.launchpad.net/horizon/+spec/quantum-vnic-ordering which has work for this BP rolled into it.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.