ThemableCheckboxSelectMultiple does not support switchable/switched behavior

Bug #1732260 reported by Akihiro Motoki
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
New
Undecided
Unassigned

Bug Description

Horizon form supports the switchable/switched mechanism which allows to show some field depending on another field.

When MultipleChoiceField is 'switched' field and the widget ThemableCheckboxSelectMultiple is used, the field is never hidden.
There is no such example in the horizon repo, but we have an example in neutron-vpnaas-dashboard [1].

'subnets' field ("Local System Subnets") should be shown only when "subnet" is selected in 'type' field, but 'subnets' field is always shown.

If I replace ThemableCheckboxSelectMultiple with CheckboxSelectMultiple (Django default widget for MultipleChoiceField), the field is hidden/shown conditionally as expected. Thus I believe it is a bug of ThemableCheckboxSelectMultiple.

[1] https://github.com/openstack/neutron-vpnaas-dashboard/blob/1705fc586bf88f4ac1c296185995a6cbc7c7edbc/neutron_vpnaas_dashboard/dashboards/project/vpn/workflows.py#L147-L156

Revision history for this message
Akihiro Motoki (amotoki) wrote :

The workaround is not to use ThemableCheckboxSelectMultiple and to use CheckboxSelectMultiple.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.