-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LUPEYALPHA-1075] Early Years Practitioner mobile number (#3293)
* Early Years Practitioner mobile number * fix resend passcode functionality * fix bug - clear mobile number when answer changed to "Would you like to provide your mobile number?"
- Loading branch information
Showing
33 changed files
with
471 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
@form.t("label"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<% caption_settings = { text: t("questions.personal_details"), size: "xl" } if show_caption %> | ||
<%= f.govuk_text_field :email_address, | ||
autocomplete: "email", | ||
spellcheck: "false", | ||
caption: caption_settings, | ||
label: { | ||
text: @form.t("label"), | ||
tag: "h1", | ||
size: heading_size | ||
}, | ||
hint: -> do %> | ||
<p><%= @form.t("hint1") %></p> | ||
<p><%= @form.t("hint2") %></p> | ||
<% end %> | ||
<%= f.hidden_field :resend, value: params[:resend] %> | ||
|
||
<% if show_help_with_access_codes %> | ||
<%= render "help_with_access_codes", communication_type: "Email" %> | ||
<% end %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
t("questions.mobile_number"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<% caption_settings = { text: t("questions.personal_details"), size: "xl" } if show_caption %> | ||
<%= f.govuk_phone_field :mobile_number, | ||
spellcheck: "false", | ||
caption: caption_settings, | ||
label: { | ||
text: t("questions.mobile_number"), | ||
tag: "h1", | ||
size: heading_size, | ||
}, | ||
hint: { text: "To verify your mobile number we will send you a text message with a 6-digit passcode. You can enter the passcode on the next screen." } %> | ||
<%= f.hidden_field :resend, value: params[:resend] %> | ||
|
||
<%= render "help_with_access_codes", communication_type: "Mobile" %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<% content_for(:page_title, page_title(t("questions.provide_mobile_number"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_with model: @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<% caption_settings = { text: t("questions.personal_details"), size: "xl" } if show_caption %> | ||
<%= f.govuk_collection_radio_buttons :provide_mobile_number, @form.radio_options, :id, :name, | ||
caption: caption_settings, | ||
legend: { | ||
text: t("questions.provide_mobile_number"), | ||
tag: "h1", | ||
size: "l" | ||
}, | ||
hint: { | ||
text: "We will only use this number if we are unable to contact you via email. It may slow down your application if we are unable to reach you." | ||
} %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
t("questions.email_address"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<%= f.govuk_text_field :email_address, | ||
autocomplete: "email", | ||
spellcheck: "false", | ||
caption: { | ||
text: t("questions.personal_details"), | ||
size: "xl" | ||
}, | ||
label: { | ||
text: t("questions.email_address"), | ||
tag: "h1", | ||
size: "xl" | ||
}, | ||
hint: -> do %> | ||
<p><%= I18n.t("questions.email_address_hint1") %></p> | ||
<p><%= I18n.t("questions.email_address_hint2") %></p> | ||
<% end %> | ||
|
||
<%= render "help_with_access_codes", communication_type: "Email" %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<%= render partial: "email_address", locals: { show_caption: true, heading_size: "xl", show_help_with_access_codes: true } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
t("questions.mobile_number"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<%= f.govuk_phone_field :mobile_number, | ||
spellcheck: "false", | ||
caption: { | ||
text: t("questions.personal_details"), | ||
size: "xl" | ||
}, | ||
label: { | ||
text: t("questions.mobile_number"), | ||
tag: "h1", | ||
size: "xl", | ||
}, | ||
hint: { text: "To verify your mobile number we will send you a text message with a 6-digit passcode. You can enter the passcode on the next screen." } %> | ||
|
||
<%= render "help_with_access_codes", communication_type: "Mobile" %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<%= render partial: "mobile_number", locals: { show_caption: true, heading_size: "xl" } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1 @@ | ||
<% content_for(:page_title, page_title(t("questions.provide_mobile_number"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_with model: @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<%= f.govuk_collection_radio_buttons :provide_mobile_number, @form.radio_options, :id, :name, | ||
caption: { | ||
text: t("questions.personal_details"), | ||
size: "xl" | ||
}, | ||
legend: { | ||
text: t("questions.provide_mobile_number"), | ||
tag: "h1", | ||
size: "l" | ||
}, | ||
hint: { | ||
text: "We will only use this number if we are unable to contact you via email. It may slow down your application if we are unable to reach you." | ||
} %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<%= render partial: "provide_mobile_number", locals: { show_caption: true} %> |
1 change: 1 addition & 0 deletions
1
app/views/early_years_payment/practitioner/claims/check_your_answers.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
placeholder |
25 changes: 1 addition & 24 deletions
25
app/views/early_years_payment/practitioner/claims/email_address.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1 @@ | ||
<% content_for(:page_title, page_title("Your email address", journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<%= f.govuk_text_field :email_address, | ||
autocomplete: "email", | ||
spellcheck: "false", | ||
label: { | ||
text: @form.t("label"), | ||
tag: "h1", | ||
size: "l" | ||
}, | ||
hint: -> do %> | ||
<p><%= @form.t("hint1") %></p> | ||
<p><%= @form.t("hint2") %></p> | ||
<% end %> | ||
|
||
<%= f.govuk_submit %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<%= render partial: "email_address", locals: { show_caption: false, heading_size: "l", show_help_with_access_codes: false } %> |
1 change: 1 addition & 0 deletions
1
app/views/early_years_payment/practitioner/claims/mobile_number.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= render partial: "mobile_number", locals: { show_caption: false, heading_size: "l" } %> |
19 changes: 19 additions & 0 deletions
19
app/views/early_years_payment/practitioner/claims/mobile_verification.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
t("one_time_password.title"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
|
||
<%= render( | ||
partial: "one_time_password", | ||
locals: { | ||
form: @form, | ||
current_journey_routing_name: current_journey_routing_name, | ||
email_or_mobile: "mobile", | ||
email_or_text_message: "a text message", | ||
show_caption: false | ||
} | ||
) %> |
1 change: 1 addition & 0 deletions
1
app/views/early_years_payment/practitioner/claims/provide_mobile_number.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= render partial: "provide_mobile_number", locals: { show_caption: false} %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,11 +68,6 @@ en: | |
no_address_found: "No addresses found matching those details" | ||
date_of_birth: "What is your date of birth?" | ||
email_address: "Email address" | ||
email_address_hint1: | ||
"We recommend you use a non-work email address in case your circumstances change while we process your payment." | ||
email_address_hint2: | ||
"To verify your email address we will send you an email with a 6-digit passcode. You can enter the passcode on the | ||
next screen." | ||
provide_mobile_number: "Would you like to provide your mobile number?" | ||
mobile_number: "Mobile number" | ||
personal_details: "Personal details" | ||
|
@@ -265,6 +260,12 @@ en: | |
select_email: Select an option to indicate whether the email is correct or not | ||
invalid_email: Invalid email address. Please select a different email address | ||
email_address: | ||
label: "Email address" | ||
hint1: | ||
"We recommend you use a non-work email address in case your circumstances change while we process your payment." | ||
hint2: | ||
"To verify your email address we will send you an email with a 6-digit passcode. You can enter the passcode on the | ||
next screen." | ||
errors: | ||
presence: "Enter an email address" | ||
format: "Enter an email address in the correct format, like [email protected]" | ||
|
Oops, something went wrong.