Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP-13164 Update markup around email fieldset #3918

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 32 additions & 34 deletions app/views/charge.njk
Original file line number Diff line number Diff line change
Expand Up @@ -530,42 +530,40 @@
{% if shouldShowEmail %}
<div class="govuk-!-width-three-quarters email-container govuk-!-padding-top-4 govuk-!-margin-top-8 pay-!-border-top">
<fieldset class="govuk-fieldset" aria-describedby="email-hint">
<div>
<legend for="email" class="govuk-!-margin-bottom-6">
{% if (allowApplePay or allowGooglePay) and not savePaymentInstrumentToAgreement %}
<h3 class="govuk-heading-m govuk-!-margin-bottom-1 web-payment-button-section">{{ __p("cardDetails.contactDetails") }}</h3>
<legend for="email" class="govuk-!-margin-bottom-6">
{% if (allowApplePay or allowGooglePay) and not savePaymentInstrumentToAgreement %}
<h3 class="govuk-heading-m govuk-!-margin-bottom-1 web-payment-button-section">{{ __p("cardDetails.contactDetails") }}</h3>
{% endif %}
<h2 class="govuk-heading-m govuk-!-margin-bottom-1 non-web-payment-button-section">{{ __p("cardDetails.contactDetails") }}</h2>
</legend>
<div id="email-hint" class="govuk-hint govuk-!-margin-bottom-2">{{ __p("cardDetails.emailHint") }}</div>

<div class="govuk-form-group {% if highlightErrorFields.email %} govuk-form-group--error{% endif %}" data-validation="email">
<label id="email-lbl" for="email" class="govuk-label">
<span
class="email-label"
data-label-replace="email"
data-original-label="{{ __p("cardDetails.email") }}">
{{ __p("cardDetails.email") }}
</span>
</label>

{% if highlightErrorFields.email %}
<p class="govuk-error-message" id="error-email">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.email }}
</p>
{% endif %}
<h2 class="govuk-heading-m govuk-!-margin-bottom-1 non-web-payment-button-section">{{ __p("cardDetails.contactDetails") }}</h2>
</legend>
<div id="email-hint" class="govuk-hint govuk-!-margin-bottom-2">{{ __p("cardDetails.emailHint") }}</div>

<div class="govuk-form-group {% if highlightErrorFields.email %} govuk-form-group--error{% endif %}" data-validation="email">
<label id="email-lbl" for="email" class="govuk-label">
<span
class="email-label"
data-label-replace="email"
data-original-label="{{ __p("cardDetails.email") }}">
{{ __p("cardDetails.email") }}
</span>
</label>

{% if highlightErrorFields.email %}
<p class="govuk-error-message" id="error-email">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.email }}
</p>
{% endif %}

<input id="email"
type="email"
name="email"
maxlength="254"
class="govuk-input govuk-!-width-full"
value="{{ email }}"
autocomplete="email"
data-confirmation="true"
data-confirmation-label="{{ __p("cardDetails.emailConfirmation") }} "/>
</div>
<input id="email"
type="email"
name="email"
maxlength="254"
class="govuk-input govuk-!-width-full"
value="{{ email }}"
autocomplete="email"
data-confirmation="true"
data-confirmation-label="{{ __p("cardDetails.emailConfirmation") }} "/>
</div>
</fieldset>
</div>
Expand Down
Loading