Update all single field checkboxes

Includes adding some code to govukCheckboxesField
to add a single boolean-like option by default, if
there are no choices added.
This commit is contained in:
Tom Byers
2020-04-09 16:31:19 +01:00
parent 2cdea66c88
commit d1ae3b812a
10 changed files with 17 additions and 30 deletions

View File

@@ -168,9 +168,11 @@ def platform_admin_services():
# Default to True if the user hasnt done any filtering,
# otherwise respect their choice
form.include_from_test_key.data = True
include_from_test_key = form.include_from_test_key.data
api_args = {'detailed': True,
'only_active': False, # specifically DO get inactive services
'include_from_test_key': form.include_from_test_key.data,
'include_from_test_key': include_from_test_key,
}
if form.start_date.data:
@@ -184,7 +186,7 @@ def platform_admin_services():
return render_template(
'views/platform-admin/services.html',
include_from_test_key=form.include_from_test_key.data,
include_from_test_key=include_from_test_key,
form=form,
services=list(format_stats_by_service(services)),
page_title='{} services'.format(