Skip to content

Commit

Permalink
MLPAB-1189 Use summary card for signing boxes (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawx authored Oct 20, 2023
1 parent c68b8e8 commit 662f3e8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 41 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/donor/confirm-your-identity-and-sign.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Confirm your identity and sign', () => {
cy.contains('Select both boxes to sign and apply to register your LPA');
});

cy.contains('.moj-ticket-panel .govuk-error-message', 'Select both boxes to sign and apply to register your LPA');
cy.contains('.govuk-error-message', 'Select both boxes to sign and apply to register your LPA');
});

it('errors when not witnessed', () => {
Expand Down
15 changes: 7 additions & 8 deletions web/template/attorney_sign.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,15 @@
{{ trHtml .App "asReplacementAttorneyAlsoConfirmThat" }}
{{ end }}

<div class="moj-ticket-panel">
<div class="moj-ticket-panel__content moj-ticket-panel__content--blue">
<p class="govuk-body govuk-!-font-weight-bold">
{{ tr .App "yourSignature" }}
</p>

<div class="govuk-form-group {{ if .Errors.Has "confirm" }}govuk-form-group--error{{ end }}">
<div class="govuk-summary-card">
<div class="govuk-summary-card__title-wrapper">
<span class="govuk-summary-card__title">{{ tr .App "yourSignature" }}</span>
</div>
<div class="govuk-summary-card__content">
<div class="govuk-form-group govuk-!-margin-bottom-0 {{ if .Errors.Has "confirm" }}govuk-form-group--error{{ end }}">
{{ template "error-message" (errorMessage . "confirm") }}

<div class="govuk-checkboxes {{ if .Errors.Has "confirm" }}govuk-checkboxes--error{{ end }}">
<div class="govuk-checkboxes">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-confirm" name="confirm" type="checkbox" value="1" {{ if .Form.Confirm }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-confirm">
Expand Down
31 changes: 14 additions & 17 deletions web/template/provide_certificate.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,22 @@
{{ trFormatHtml .App "provideTheCertificateForThisLpaContent" "DonorFullName" .Lpa.Donor.FullName }}

<form novalidate method="post">
<div class="moj-ticket-panel">
<div class="moj-ticket-panel__content moj-ticket-panel__content--blue">
<div class="govuk-form-group {{ if .Errors.Has "agree-to-statement" }}govuk-form-group--error{{ end }}">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--m">
{{ tr .App "yourSignature" }}
</legend>

{{ template "error-message" (errorMessage . "agree-to-statement") }}
<div class="govuk-summary-card">
<div class="govuk-summary-card__title-wrapper">
<span class="govuk-summary-card__title">{{ tr .App "yourSignature" }}</span>
</div>
<div class="govuk-summary-card__content">
<div class="govuk-form-group govuk-!-margin-bottom-0 {{ if .Errors.Has "agree-to-statement" }}govuk-form-group--error{{ end }}">
{{ template "error-message" (errorMessage . "agree-to-statement") }}

<div class="govuk-checkboxes" data-module="govuk-checkboxes">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-agree-to-statement" name="agree-to-statement" type="checkbox" value="1" {{ if .Form.AgreeToStatement }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-agree-to-statement">
{{ trFormat .App "iAgreeToTheseStatements" "FullName" .Lpa.CertificateProvider.FullName }}
</label>
</div>
<div class="govuk-checkboxes" data-module="govuk-checkboxes">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-agree-to-statement" name="agree-to-statement" type="checkbox" value="1" {{ if .Form.AgreeToStatement }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-agree-to-statement">
{{ trFormat .App "iAgreeToTheseStatements" "FullName" .Lpa.CertificateProvider.FullName }}
</label>
</div>
</fieldset>
</div>
</div>
</div>
</div>
Expand Down
12 changes: 5 additions & 7 deletions web/template/sign_the_lpa_on_behalf.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,24 @@
<div class="govuk-form-group {{ if .Errors.Has "sign-lpa" }}govuk-form-group--error{{ end }}">
{{ template "error-message" (errorMessage . "sign-lpa") }}

<div class="govuk-checkboxes {{ if .Errors.Has "sign-lpa" }}govuk-checkboxes--error{{ end }}">
<div class="govuk-checkboxes">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-sign-lpa" name="sign-lpa" type="checkbox" value="{{ .WantToSignFormValue }}" {{ if eq .Lpa.WantToSignLpa true }}checked{{ end }}>
<input class="govuk-checkboxes__input" id="f-sign-lpa" name="sign-lpa" type="checkbox" value="{{ .WantToSignFormValue }}" {{ if .Lpa.WantToSignLpa }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-sign-lpa">
{{ trFormat .App "donorWantsToSignThisLpa" "DonorFullName" .Lpa.Donor.FullName }}
</label>
</div>

<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-sign-lpa-2" name="sign-lpa" type="checkbox" value="{{ .WantToApplyFormValue }}" {{ if eq .Lpa.WantToApplyForLpa true }}checked{{ end }}>
<input class="govuk-checkboxes__input" id="f-sign-lpa-2" name="sign-lpa" type="checkbox" value="{{ .WantToApplyFormValue }}" {{ if .Lpa.WantToApplyForLpa }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-sign-lpa-2">
{{ trFormat .App "donorWantsToApply" "DonorFullName" .Lpa.Donor.FullName }}
</label>
</div>

<div class="govuk-body">
{{ tr .App "whenYouTickAsAuthorisedSignatory" }}
</div>
</div>
</div>

<div class="govuk-body">{{ tr .App "whenYouTickAsAuthorisedSignatory" }}</div>
</div>
</div>

Expand Down
17 changes: 9 additions & 8 deletions web/template/sign_your_lpa.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@
</ul>

<form novalidate method="post">
<div class="moj-ticket-panel">
<div class="moj-ticket-panel__content moj-ticket-panel__content--blue">
<div class="govuk-summary-card">
<div class="govuk-summary-card__title-wrapper">
<span class="govuk-summary-card__title">{{ tr .App "yourSignature" }}</span>
</div>
<div class="govuk-summary-card__content">
<p class="govuk-body govuk-!-font-weight-bold">
{{ trFormat .App "iConfirmThat" "DonorFullName" .Lpa.Donor.FullName }}
</p>
Expand All @@ -55,24 +58,22 @@

<div class="govuk-checkboxes {{ if .Errors.Has "sign-lpa" }}govuk-checkboxes--error{{ end }}">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-sign-lpa" name="sign-lpa" type="checkbox" value="{{ .WantToSignFormValue }}" {{ if eq .Lpa.WantToSignLpa true }}checked{{ end }}>
<input class="govuk-checkboxes__input" id="f-sign-lpa" name="sign-lpa" type="checkbox" value="{{ .WantToSignFormValue }}" {{ if .Lpa.WantToSignLpa }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-sign-lpa">
{{ tr .App "iWantToSignThisLpa" }}
</label>
</div>

<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="f-sign-lpa-2" name="sign-lpa" type="checkbox" value="{{ .WantToApplyFormValue }}" {{ if eq .Lpa.WantToApplyForLpa true }}checked{{ end }}>
<input class="govuk-checkboxes__input" id="f-sign-lpa-2" name="sign-lpa" type="checkbox" value="{{ .WantToApplyFormValue }}" {{ if .Lpa.WantToApplyForLpa }}checked{{ end }}>
<label class="govuk-label govuk-checkboxes__label" for="f-sign-lpa-2">
{{ tr .App "wantToApply" }}
</label>
</div>

<div class="govuk-body">
{{ tr .App "whenYouTickAndClick" }}
</div>
</div>
</div>

<p class="govuk-body">{{ tr .App "whenYouTickAndClick" }}</p>
</div>
</div>

Expand Down

0 comments on commit 662f3e8

Please sign in to comment.