Convert EmailFields to GovukEmailFields

Changes those fields (and sometimes also regular text input fields)
 in the following forms:
- LoginForm
- RegisterUserForm
- ChangeEmailForm
- FeedbackOrProblem
- AcceptAgreementForm
- ChangeNameForm (only name field here, but used in the same template
field as ChangeEmailForm here: app/templates/views/user-profile/change.html)

Also includes changes to templates that use this form
and associated tests.
This commit is contained in:
Pea Tyczynska
2020-08-07 15:16:04 +01:00
committed by Tom Byers
parent 7e771a5fa1
commit 39bc7cf721
21 changed files with 95 additions and 76 deletions

View File

@@ -1,5 +1,4 @@
{% from "components/banner.html" import banner, banner_wrapper %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% from "components/button/macro.njk" import govukButton %}
@@ -47,11 +46,12 @@
{% call form_wrapper(
action = form_url
) %}
{{ textbox(
form.email_address,
width='1-1',
safe_error_message=True,
hint='This should be a shared inbox managed by your team, not your own email address'
{{ form.email_address(
param_extensions={
"hint": {"text": "This should be a shared inbox managed by your team, not your own email address"},
"classes": "govuk-!-width-full"
},
error_message_with_html=True
) }}
{% if not first_email_address and not existing_is_default %}
{{ form.is_default }}

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/form.html" import form_wrapper %}
@@ -16,11 +15,12 @@
) }}
{% call form_wrapper() %}
{{ textbox(
form.email_address,
width='1-1',
hint='This should be a shared inbox managed by your team, not your own email address',
safe_error_message=True
{{ form.email_address(
param_extensions={
"hint": {"text": "This should be a shared inbox managed by your team, not your own email address"},
"classes": "govuk-!-width-full"
},
error_message_with_html=True
) }}
{% if not first_email_address %}
{{ form.is_default }}

View File

@@ -16,11 +16,12 @@
back_link=url_for('main.service_email_reply_to', service_id=current_service.id)
) }}
{% call form_wrapper() %}
{{ textbox(
form.email_address,
width='1-1',
safe_error_message=True,
hint='This should be a shared inbox managed by your team, not your own email address.'
{{ form.email_address(
param_extensions={
"hint": {"text": "This should be a shared inbox managed by your team, not your own email address"},
"classes": "govuk-!-width-full"
},
error_message_with_html=True
) }}
{% if form.is_default.data %}
<p class="form-group">