Skip to content

Commit

Permalink
Fix Enter key action for pages with multiple submit buttons (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Jan 3, 2024
1 parent 759f10f commit 7ae59c3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<govuk-input-label is-page-heading="true" class="govuk-label--l"/>
</govuk-input>

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>

<govuk-details>
<govuk-details-summary>
@(Model.TrnMatchPolicy == TrnMatchPolicy.Strict ? "I cannot provide my National Insurance number" : "I do not know my National Insurance number")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
input-class="govuk-input--extra-letter-spacing"
label-class="govuk-label--s" />

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>

<govuk-details>
<govuk-details-summary>I do not have access to a mobile phone</govuk-details-summary>
<govuk-details-text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
autocomplete="one-time-code"
label-class="govuk-label--s" />

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>

<govuk-details>
<govuk-details-summary>I have not received a code</govuk-details-summary>
<govuk-details-text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
spellcheck="false"
label-class="govuk-label--s"/>

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>

@if (Model.ShowContinueWithoutTrnButton)
{
<govuk-details>
Expand Down

0 comments on commit 7ae59c3

Please sign in to comment.