From d0b8610cd889e9dac125edcf4b34ba5eebbc151e Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Fri, 26 Jun 2020 21:56:08 +0100 Subject: [PATCH] Convert radios on research consent (basic) --- app/main/forms.py | 5 ++++- app/templates/views/service-settings/estimate-usage.html | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 44ab8bd3e..0fde6c862 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1569,13 +1569,16 @@ class EstimateUsageForm(StripWhitespaceForm): things='letters', format_error_suffix='you expect to send', ) - consent_to_research = RadioField( + consent_to_research = GovukRadiosField( 'Can we contact you when we’re doing user research?', choices=[ ('yes', 'Yes'), ('no', 'No'), ], thing='yes or no', + param_extensions={ + 'hint': {'text': 'You do not have to take part and you can unsubscribe at any time'} + } ) at_least_one_volume_filled = True diff --git a/app/templates/views/service-settings/estimate-usage.html b/app/templates/views/service-settings/estimate-usage.html index 0f26640ae..6fdbb2383 100644 --- a/app/templates/views/service-settings/estimate-usage.html +++ b/app/templates/views/service-settings/estimate-usage.html @@ -3,7 +3,6 @@ {% from "components/form.html" import form_wrapper %} {% from "components/page-header.html" import page_header %} {% from "components/page-footer.html" import page_footer %} -{% from "components/radios.html" import radios %} {% block service_page_title %} Tell us how many messages you expect to send @@ -39,7 +38,7 @@ "hint": {"text": "For example, 50,000"}, }) }} - {{ radios(form.consent_to_research, hint='You do not have to take part and you can unsubscribe at any time') }} + {{ form.consent_to_research }} {{ page_footer('Continue') }} {% endcall %}