diff --git a/app/main/forms.py b/app/main/forms.py index c6a19adb7..5d2709d77 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -2009,7 +2009,7 @@ class LinkOrganisationsForm(StripWhitespaceForm): super().__init__(*args, **kwargs) self.organisations.choices = kwargs['choices'] - organisations = RadioField( + organisations = GovukRadiosField( 'Select an organisation', validators=[ DataRequired() diff --git a/app/templates/views/service-settings/link-service-to-organisation.html b/app/templates/views/service-settings/link-service-to-organisation.html index 2b50edee5..20c3010bc 100644 --- a/app/templates/views/service-settings/link-service-to-organisation.html +++ b/app/templates/views/service-settings/link-service-to-organisation.html @@ -1,5 +1,4 @@ {% extends "withnav_template.html" %} -{% from "components/radios.html" import radios %} {% from "components/page-header.html" import page_header %} {% from "components/page-footer.html" import sticky_page_footer %} {% from "components/live-search.html" import live_search %} @@ -18,14 +17,14 @@ back_link=url_for('.service_settings', service_id=current_service.id) ) }} {{ live_search( - target_selector='.multiple-choice', + target_selector='.govuk-radios__item', show=True, form=search_form, label='Search by name', autofocus=True ) }} {% call form_wrapper() %} {% if has_organisations %} - {{ radios(form.organisations) }} + {{ form.organisations }} {{ sticky_page_footer('Save') }} {% else %}

No organisations

diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index f69e8c74e..909a80d22 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -4494,10 +4494,10 @@ def test_select_organisation( assert response.status_code == 200 page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') - assert len(page.select('.multiple-choice')) == 3 + assert len(page.select('.govuk-radios__item')) == 3 for i in range(0, 3): assert normalize_spaces( - page.select('.multiple-choice label')[i].text + page.select('.govuk-radios__item label')[i].text ) == 'Org {}'.format(i + 1)