Simplify network choice form to use boolean radio

This follows the same pattern as in other forms [1].

[1]: 1b459d6692/app/templates/views/organisations/add-gp-organisation.html (L20)
This commit is contained in:
Ben Thorner
2021-06-07 16:52:36 +01:00
parent 5ce76b8b33
commit ef8cab7fa4
4 changed files with 28 additions and 38 deletions

View File

@@ -19,9 +19,9 @@
back_link=url_for('.service_set_broadcast_channel', service_id=current_service.id)
) }}
{% call form_wrapper() %}
{% call select_wrapper(form.network_variant, hide_legend=True) %}
{% for option in form.network_variant %}
{{ radio(option, data_target='single-network' if option.data == "" else None) }}
{% call select_wrapper(form.all_networks, hide_legend=True) %}
{% for option in form.all_networks %}
{{ radio(option, data_target='single-network' if option.data == False else None) }}
{% endfor %}
{% endcall %}
{% call conditional_radio_panel('single-network') %}