Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpearce-digital authored Jan 2, 2025
2 parents 34ed6b3 + 050bf95 commit 0f7b03f
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 15 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/certificate-provider/certificate-provided.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ describe('Certificate provided', () => {
cy.contains('a', 'Go to your dashboard').click();
cy.url().should('contain', '/dashboard');
});

describe('when going to the post office', () => {
it('shows a deadline', () => {
cy.visit('/fixtures/certificate-provider?redirect=/certificate-provided&progress=confirmYourIdentity&idStatus=post-office');

cy.contains('Now that you have provided the certificate for this LPA, you must confirm your identity and connect it to your LPA account by:');
});
});
})
2 changes: 2 additions & 0 deletions internal/page/fixtures/certificate_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ func CertificateProvider(
DateOfBirth: certificateProvider.DateOfBirth,
}
certificateProvider.Tasks.ConfirmYourIdentity = task.IdentityStatePending
case "post-office":
certificateProvider.Tasks.ConfirmYourIdentity = task.IdentityStatePending
default:
userData = identity.UserData{
Status: identity.StatusConfirmed,
Expand Down
4 changes: 3 additions & 1 deletion lang/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1504,5 +1504,7 @@
"youHaveChosenToConfirmYourIdentityAtPostOffice": "Welsh",
"whenYouHaveConfirmedAtPostOfficeReturnToTaskList": "Welsh",
"youveSubmittedYourLpaToOpg": "Welsh",
"opgIsCheckingYourLpa": "Welsh"
"opgIsCheckingYourLpa": "Welsh",
"weHaveSentAnEmailYouProvidedCertificate": "<p class=\"govuk-body\">Welsh {{.CertificateProviderEmail}}</p>",
"certificateProviderNowConfirmYourIdentityContent": "<h2 class=\"govuk-heading-m\">Welsh {{.DonorFullName}} {{.DonorFirstNames}} {{.Deadline}}</h2>"
}
4 changes: 3 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1400,5 +1400,7 @@
"youHaveChosenToConfirmYourIdentityAtPostOffice": "You have chosen to confirm your identity at a Post Office",
"whenYouHaveConfirmedAtPostOfficeReturnToTaskList": "When you have confirmed your identity at a Post Office, return to your task list for the steps you must take to complete this process.",
"youveSubmittedYourLpaToOpg": "You’ve submitted your LPA to the Office of the Public Guardian (OPG)",
"opgIsCheckingYourLpa": "OPG is checking your LPA. We will contact you if there is anything you need to do."
"opgIsCheckingYourLpa": "OPG is checking your LPA. We will contact you if there is anything you need to do.",
"weHaveSentAnEmailYouProvidedCertificate": "<p class=\"govuk-body\">We have sent an email confirming that you provided your certificate for this LPA to <span class=\"govuk-!-font-weight-bold\">{{.CertificateProviderEmail}}</span>.</p><p class=\"govuk-body\">If you would like a paper record, you can also print a copy of this page.</p>",
"certificateProviderNowConfirmYourIdentityContent": "<h2 class=\"govuk-heading-m\">Confirm your identity</h2><p class=\"govuk-body\">Your role as {{possessive .DonorFullName}} certificate provider will not be finalized until you confirm your identity.</p><ol class=\"govuk-list govuk-list--number\"><li>Visit the Post Office to confirm your identity. When you have done so, you’ll get an email from the Post Office and GOV.UK One Login will be updated.</li><li>Log back into your LPA account. Select ‘Confirm identity’ from the task list and follow the prompts to return to GOV.UK One Login.</li><li>Your GOV.UK One Login identity confirmation will then be connected to your LPA account.</li></ol><div class=\"govuk-inset-text\"><p class=\"govuk-body\">Now that you have provided the certificate for this LPA, you must confirm your identity and connect it to your LPA account by:</p><p class=\"govuk-body govuk-!-font-weight-bold\">{{.Deadline}}</p></div><h2 class=\"govuk-heading-m\">When you have confirmed your identity</h2><p class=\"govuk-body\">When you have confirmed your identity, you will no longer be able to view or access this LPA from your dashboard.</p><p class=\"govuk-body\">If the Office of the Public Guardian ever has any concerns about {{possessive .DonorFirstNames}} LPA in future, we may contact you.</p><p class=\"govuk-body\">If you ever need to report a concern, you can do this at any time using the <a href=\"#\" class=\"govuk-link\">report a concern about an LPA service</a>.</p>"
}
8 changes: 8 additions & 0 deletions web/assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ function init() {
}, false);
}

const printThisPage = document.getElementById('print-this-page');
if (printThisPage) {
printThisPage.addEventListener('click', function(e) {
window.print();
e.preventDefault();
}, false);
}

function metaContent(name) {
return document.querySelector(`meta[name=${name}]`).content;
}
Expand Down
34 changes: 22 additions & 12 deletions web/template/certificateprovider/certificate_provided.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,33 @@
{{ define "pageTitle" }}{{ tr .App "youveProvidedTheCertificateForThisLpa" }}{{ end }}

{{ define "main" }}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div class="govuk-panel govuk-panel--confirmation app-hide-print">
<h1 class="govuk-panel__title">{{ tr .App "youveProvidedTheCertificateForThisLpa" }}</h1>
</div>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div class="govuk-panel govuk-panel--confirmation app-hide-print">
<h1 class="govuk-panel__title">{{ tr .App "youveProvidedTheCertificateForThisLpa" }}</h1>
</div>

{{ trFormatHtml .App "certificateProvidedContent" "DonorFullName" .Lpa.Donor.FullName "DonorFirstNames" .Lpa.Donor.FirstNames "CertificateProviderFullName" .Lpa.CertificateProvider.FullName }}
{{ trFormatHtml .App "certificateProvidedContent" "DonorFullName" .Lpa.Donor.FullName "DonorFirstNames" .Lpa.Donor.FirstNames "CertificateProviderFullName" .Lpa.CertificateProvider.FullName }}

{{ trFormatHtml .App "certificateDetails" "SignedAt" (formatDateTime .App .CertificateProvider.SignedAt) "LpaUID" .Lpa.LpaUID "DonorFullName" .Lpa.Donor.FullName }}
{{ trFormatHtml .App "certificateDetails" "SignedAt" (formatDateTime .App .CertificateProvider.SignedAt) "LpaUID" .Lpa.LpaUID "DonorFullName" .Lpa.Donor.FullName }}

{{ trFormatHtml .App "thisMeansYouveDoneEverythingContent" "DonorFullName" .Lpa.Donor.FullName "CertificateProviderEmail" .Lpa.CertificateProvider.Email }}
{{ if .CertificateProvider.Tasks.ConfirmYourIdentity.IsCompleted }}
{{ trFormatHtml .App "thisMeansYouveDoneEverythingContent" "DonorFullName" .Lpa.Donor.FullName "CertificateProviderEmail" .Lpa.CertificateProvider.Email }}

{{ template "print-this-page" . }}
{{ template "print-this-page" . }}

{{ trFormatHtml .App "certificateProvidedConcerns" "DonorFirstNames" .Lpa.Donor.FirstNames }}
{{ trFormatHtml .App "certificateProvidedConcerns" "DonorFirstNames" .Lpa.Donor.FirstNames }}

<a href="{{ link .App global.Paths.Dashboard.Format }}" class="govuk-button app-hide-print">{{ tr .App "goToYourDashboard" }}</a>
<a href="{{ link .App global.Paths.Dashboard.Format }}" class="govuk-button app-hide-print">{{ tr .App "goToYourDashboard" }}</a>
{{ else }}
{{ trFormatHtml .App "weHaveSentAnEmailYouProvidedCertificate" "CertificateProviderEmail" .Lpa.CertificateProvider.Email }}

{{ template "print-this-page" . }}

{{ trFormatHtml .App "certificateProviderNowConfirmYourIdentityContent" "DonorFullName" .Lpa.Donor.FullName "Deadline" (formatDate .App .CertificateProvider.IdentityDeadline) "DonorFirstNames" .Lpa.Donor.FirstNames }}

{{ template "buttons" (button .App "goToYourDashboard" "link" global.Paths.Dashboard.Format) }}
{{ end }}
</div>
</div>
</div>
{{ end }}
2 changes: 1 addition & 1 deletion web/template/layout/print-this-page.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</clipPath>
</defs>
</svg>
<a href="#" class="govuk-link" onclick="window.print()">{{ tr .App "printThisPage"}}</a>
<a href="#" class="govuk-link" id="print-this-page">{{ tr .App "printThisPage"}}</a>
</p>
{{ end }}

0 comments on commit 0f7b03f

Please sign in to comment.