Updated openstack/openstack
Project: openstack/horizon  15585419857efc3db0d19b2f99667a94f29a68a9

Add additional attributes to choices in ChoiceField

This feature enables user to customize choices in a  drop down
list of a form by adding additional properties to the 'choices'
attribute of ChoiceField class.
Currently, the ChoiceField class has an attribute choices which
takes a list of 2 element tuple by default.
    self.field[<field name>].choices = ([
                                   (option_value1, option_label1),
                                   (option_value2, option_label2)
                                       ])
With this implementation,users can specify an additional transform
function in the forms.fields.SelectWidget class called
transform_html_attrs. Given the option label for a given choice,
transform_html_attrs will return a dictionary containing the html
attributes and their values

Implements: blueprint add-attributes-to-form-field-choices
Change-Id: I8ba997c58b485a33676cf9f350be00a1f365256f