Convert radios on /support page (basic)

This commit is contained in:
Tom Byers
2020-07-03 11:52:54 +01:00
parent 0f269a1259
commit ca50cf63cb
2 changed files with 7 additions and 5 deletions

View File

@@ -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', 'Im a member of the public with a question for the government'),
],
param_extensions={
"fieldset": {"legend": {"classes": "govuk-visually-hidden"}}
}
)

View File

@@ -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 %}
<p class="govuk-body">
What do you need help with?
</p>
{{ radios(form.who, hide_legend=True) }}
{{ form.who }}
{% endif %}
{{ page_footer('Continue') }}
{% endcall %}