From ca50cf63cb153aff5150bab998475b5d4cf1560b Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Fri, 3 Jul 2020 11:52:54 +0100 Subject: [PATCH] Convert radios on /support page (basic) --- app/main/forms.py | 7 +++++-- app/templates/views/support/index.html | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 69f30c82b..9bd9e99fa 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1516,7 +1516,7 @@ class CreateKeyForm(StripWhitespaceForm): class SupportType(StripWhitespaceForm): - support_type = RadioField( + support_type = GovukRadiosField( 'How can we help you?', choices=[ (PROBLEM_TICKET_TYPE, 'Report a problem'), @@ -1526,12 +1526,15 @@ class SupportType(StripWhitespaceForm): class SupportRedirect(StripWhitespaceForm): - who = RadioField( + who = GovukRadiosField( 'What do you need help with?', choices=[ ('public-sector', 'I work in the public sector and need to send emails, text messages or letters'), ('public', 'I’m a member of the public with a question for the government'), ], + param_extensions={ + "fieldset": {"legend": {"classes": "govuk-visually-hidden"}} + } ) diff --git a/app/templates/views/support/index.html b/app/templates/views/support/index.html index 25400bc52..8e6ac7371 100644 --- a/app/templates/views/support/index.html +++ b/app/templates/views/support/index.html @@ -1,5 +1,4 @@ {% extends "withoutnav_template.html" %} -{% from "components/radios.html" import radios %} {% from "components/page-footer.html" import page_footer %} {% from "components/form.html" import form_wrapper %} @@ -14,12 +13,12 @@ {% call form_wrapper() %} {% if current_user.is_authenticated %} - {{ radios(form.support_type) }} + {{ form.support_type }} {% else %}

What do you need help with?

- {{ radios(form.who, hide_legend=True) }} + {{ form.who }} {% endif %} {{ page_footer('Continue') }} {% endcall %}