Update ServiceContactDetailsForm with new fields

Changes its:
- StringFields to GovukTextInputFields
- EmailFields to GovukEmailFields

Includes changes to templates that use this form
and associated tests.
This commit is contained in:
Tom Byers
2020-08-07 12:21:05 +01:00
parent 880a0a3318
commit 11dcd87115
3 changed files with 5 additions and 6 deletions

View File

@@ -1525,9 +1525,9 @@ class ServiceContactDetailsForm(StripWhitespaceForm):
],
)
url = StringField("URL")
email_address = EmailField("Email address")
phone_number = StringField("Phone number")
url = GovukTextInputField("URL")
email_address = GovukEmailField("Email address")
phone_number = GovukTextInputField("Phone number")
def validate(self):

View File

@@ -1,5 +1,4 @@
{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/radios.html" import radio %}
@@ -35,7 +34,7 @@
{{ radio(option, data_target=data_target) }}
<div class="panel panel-border-narrow js-hidden" id={{data_target}}>
{{ textbox(form|attr(option.data), label=' ', width='1-1') }}
{{ form|attr(option.data)(param_extensions={"classes": "govuk-!-width-full", "label": {"text": " "}}) }}
</div>
{% endfor %}
{% endcall %}