mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-16 11:20:12 -04:00
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:
@@ -353,23 +353,21 @@ def service_set_broadcast_channel(service_id):
|
||||
def service_set_broadcast_network(service_id, broadcast_channel):
|
||||
# only populate old settings when the channel is unchanged
|
||||
if current_service.broadcast_channel == broadcast_channel:
|
||||
if current_service.allowed_broadcast_provider == 'all':
|
||||
provider = current_service.allowed_broadcast_provider
|
||||
|
||||
if provider == 'all':
|
||||
form = ServiceBroadcastNetworkForm(
|
||||
broadcast_channel=broadcast_channel,
|
||||
network_variant=(
|
||||
current_service.live,
|
||||
current_service.broadcast_channel,
|
||||
current_service.allowed_broadcast_provider,
|
||||
),
|
||||
all_networks=True,
|
||||
)
|
||||
else:
|
||||
form = ServiceBroadcastNetworkForm(
|
||||
broadcast_channel=broadcast_channel,
|
||||
network_variant='',
|
||||
all_networks=False,
|
||||
network=(
|
||||
current_service.live,
|
||||
current_service.broadcast_channel,
|
||||
current_service.allowed_broadcast_provider
|
||||
provider,
|
||||
)
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user