diff --git a/app/main/forms.py b/app/main/forms.py index f029cb4d4..c28997205 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -2272,7 +2272,7 @@ class TemplateAndFoldersSelectionForm(Form): class ClearCacheForm(StripWhitespaceForm): - model_type = RadioField( + model_type = GovukRadiosField( 'What do you want to clear today', ) diff --git a/app/templates/views/platform-admin/clear-cache.html b/app/templates/views/platform-admin/clear-cache.html index b601dff30..52e7666ce 100644 --- a/app/templates/views/platform-admin/clear-cache.html +++ b/app/templates/views/platform-admin/clear-cache.html @@ -1,6 +1,5 @@ {% extends "views/platform-admin/_base_template.html" %} {% from "components/form.html" import form_wrapper %} -{% from "components/radios.html" import radios %} {% from "components/page-footer.html" import page_footer %} {% block per_page_title %} @@ -14,7 +13,7 @@ {% call form_wrapper() %} - {{ radios(form.model_type) }} + {{ form.model_type }} {{ page_footer('Clear') }} {% endcall %} diff --git a/tests/app/main/views/test_platform_admin.py b/tests/app/main/views/test_platform_admin.py index 1f1fb9757..e4b99cb45 100644 --- a/tests/app/main/views/test_platform_admin.py +++ b/tests/app/main/views/test_platform_admin.py @@ -744,7 +744,7 @@ def test_clear_cache_requires_option(client_request, platform_admin_user, mocker page = client_request.post('main.clear_cache', _data={}, _expected_status=200) - assert normalize_spaces(page.find('span', class_='error-message').text) == 'Select an option' + assert normalize_spaces(page.find('span', class_='govuk-error-message').text) == 'Error: Select an option' assert not redis.delete_cache_keys_by_pattern.called