From c80ac5aea63d3d7fb528c3cadb9427fe1a6649bb Mon Sep 17 00:00:00 2001 From: Joshua Hawxwell Date: Thu, 19 Sep 2024 15:00:18 +0100 Subject: [PATCH] Add contextual LPA for view LPA --- cmd/mlpa/main_test.go | 25 + cypress/e2e/donor/view-lpa.cy.js | 51 ++ docker/mock-lpa-store/lpa-store.js | 165 ++--- internal/actor/actor.go | 4 + internal/actor/actor_test.go | 11 + .../donor/donordata/authorised_signatory.go | 7 +- .../donor/donordata/independent_witness.go | 2 + internal/donor/donordata/provided_test.go | 8 +- internal/donor/donorpage/register.go | 7 +- internal/donor/donorpage/view_lpa.go | 31 + internal/donor/donorpage/view_lpa_test.go | 67 ++ .../donorpage/your_authorised_signatory.go | 7 +- .../your_authorised_signatory_test.go | 17 +- .../donorpage/your_independent_witness.go | 7 +- .../your_independent_witness_test.go | 17 +- internal/donor/path.go | 1 + internal/lpastore/lpa.go | 11 +- .../lpastore/lpadata/independent_witness.go | 18 + .../lpadata/independent_witness_test.go | 11 + internal/lpastore/lpadata/lpa.go | 9 +- internal/lpastore/lpadata/lpa_test.go | 21 +- .../lpadata/trust_corporation_signatory.go | 4 + .../trust_corporation_signatory_test.go | 11 + internal/lpastore/resolving_service.go | 7 +- internal/lpastore/resolving_service_test.go | 6 +- internal/page/fixtures/donor.go | 6 +- internal/templatefn/fn.go | 12 + internal/templatefn/fn_test.go | 13 + internal/templatefn/paths.go | 2 + lang/cy.json | 28 +- lang/en.json | 30 +- web/assets/main.js | 7 +- web/assets/scss/main.scss | 11 + web/template/attorney/sign.gohtml | 8 +- .../provide_certificate.gohtml | 2 + web/template/dashboard.gohtml | 12 +- web/template/donor/read_your_lpa.gohtml | 2 +- web/template/donor/sign_your_lpa.gohtml | 2 +- web/template/donor/view_lpa.gohtml | 13 + ...r_legal_rights_and_responsibilities.gohtml | 2 + .../layout/address-summary-row.gohtml | 2 +- .../layout/changeable-contextual-lpa.gohtml | 490 ++++++++++++++ .../layout/contextual-lpa-warning.gohtml | 3 + web/template/layout/contextual-lpa.gohtml | 611 ++++++++++-------- web/template/layout/summary-row.gohtml | 2 +- 45 files changed, 1348 insertions(+), 435 deletions(-) create mode 100644 cypress/e2e/donor/view-lpa.cy.js create mode 100644 internal/actor/actor_test.go create mode 100644 internal/donor/donorpage/view_lpa.go create mode 100644 internal/donor/donorpage/view_lpa_test.go create mode 100644 internal/lpastore/lpadata/independent_witness.go create mode 100644 internal/lpastore/lpadata/independent_witness_test.go create mode 100644 internal/lpastore/lpadata/trust_corporation_signatory_test.go create mode 100644 web/template/donor/view_lpa.gohtml create mode 100644 web/template/layout/changeable-contextual-lpa.gohtml create mode 100644 web/template/layout/contextual-lpa-warning.gohtml diff --git a/cmd/mlpa/main_test.go b/cmd/mlpa/main_test.go index a37f049a25..bca782c143 100644 --- a/cmd/mlpa/main_test.go +++ b/cmd/mlpa/main_test.go @@ -15,6 +15,8 @@ import ( "github.com/stretchr/testify/assert" ) +var htmlTagRe = regexp.MustCompile("<.+?>") + func TestAwsRegion(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/task" { @@ -141,6 +143,21 @@ func TestTranslationVariablesMustMatch(t *testing.T) { } } +func TestTranslationContentMustMatch(t *testing.T) { + en := loadTranslations("../../lang/en.json") + cy := loadTranslations("../../lang/cy.json") + + mustMatch := map[string]string{ + "yourLegalRightsAndResponsibilitiesContent:property-and-affairs": "yourLegalRightsAndResponsibilitiesContent:property-and-affairs:h3", + "yourLegalRightsAndResponsibilitiesContent:personal-welfare": "yourLegalRightsAndResponsibilitiesContent:personal-welfare:h3", + } + + for a, b := range mustMatch { + assert.Equal(t, stripHTML(en[a]), stripHTML(en[b])) + assert.Equal(t, stripHTML(cy[a]), stripHTML(cy[b])) + } +} + func loadTranslations(path string) map[string]string { data, err := os.ReadFile(path) if err != nil { @@ -152,3 +169,11 @@ func loadTranslations(path string) map[string]string { return v } + +func TestStripHTML(t *testing.T) { + assert.Equal(t, "Heylink", stripHTML(`

Hey

link
`)) +} + +func stripHTML(s string) string { + return htmlTagRe.ReplaceAllString(s, "") +} diff --git a/cypress/e2e/donor/view-lpa.cy.js b/cypress/e2e/donor/view-lpa.cy.js new file mode 100644 index 0000000000..33d24f19bf --- /dev/null +++ b/cypress/e2e/donor/view-lpa.cy.js @@ -0,0 +1,51 @@ +describe('View LPA', () => { + describe('when signed by donor', () => { + beforeEach(() => { + cy.visit('/fixtures?redirect=/view-lpa&progress=signTheLpa'); + }); + + it('shows the actors', () => { + cy.contains('Donor: Sam Smith'); + cy.contains('Certificate provider: Charlie Cooper'); + cy.contains('Attorney: Jessie Jones'); + cy.contains('Attorney: Robin Redcar'); + cy.contains('Replacement attorney: Blake Buckley'); + cy.contains('Replacement attorney: Taylor Thompson'); + cy.contains('Person to notify: Jordan Jefferson'); + cy.contains('Person to notify: Danni Davies'); + }); + + it('shows the decisions', () => { + cy.contains('Whether or not I have mental capacity to make a particular decision myself'); + cy.contains('Jointly and severally - your attorneys can make decisions both on their own or together'); + cy.contains('All together, as soon as one of your attorneys can no longer act. They will be able to make decisions jointly and severally with any attorney who is continuing to act.'); + cy.contains('My attorneys must not sell my home unless, in my doctor’s opinion, I can no longer live independently'); + }); + + it('contains the donor signature', () => { + cy.contains('Signed by Sam Smith on: 2 January 2023'); + cy.contains('Witnessed by Charlie Cooper on: 2 January 2023'); + }); + + it('does not contain other signatures', () => { + cy.contains('Attorney signature').should('not.exist'); + }); + }); + + describe('when signed by everyone', () => { + beforeEach(() => { + cy.visit('/fixtures?redirect=/view-lpa&attorneys=trust-corporation&progress=submitted'); + }); + + it('shows all signatures', () => { + cy.contains('Signed by Sam Smith on: 2 January 2023'); + cy.contains('Witnessed by Charlie Cooper on: 2 January 2023'); + cy.contains('Signed by Charlie Cooper on: 5 January 2023'); + cy.contains('Signed by Jessie Jones on: 12 January 2023'); + cy.contains('Signed by Robin Redcar on: 12 January 2023'); + cy.contains('Signed by A Sign on: 17 January 2023'); + cy.contains('Signed by Blake Buckley on: 12 January 2023'); + cy.contains('Signed by Taylor Thompson on: 12 January 2023'); + }); + }); +}); diff --git a/docker/mock-lpa-store/lpa-store.js b/docker/mock-lpa-store/lpa-store.js index 2a6aa6d34d..003c80746d 100644 --- a/docker/mock-lpa-store/lpa-store.js +++ b/docker/mock-lpa-store/lpa-store.js @@ -5,99 +5,102 @@ const pathParts = context.request.path.split('/'); const lpaUID = pathParts[2] switch (context.request.method) { - case 'GET': { - if (pathParts.length == 3 && pathParts[1] == 'lpas') { - const lpa = lpaStore.load(lpaUID); - if (lpa) { - respond().withContent(lpa); - } else { - respond().withStatusCode(404); - } - } else { - respond(); + case 'GET': { + if (pathParts.length == 3 && pathParts[1] == 'lpas') { + const lpa = lpaStore.load(lpaUID); + if (lpa) { + respond().withContent(lpa); + } else { + respond().withStatusCode(404); + } + } else { + respond(); + } + break; } - break; - } - case 'PUT': { - let lpa = JSON.parse(context.request.body); - lpa.uid = lpaUID; - lpa.updatedAt = new Date(Date.now()).toISOString(); - lpaStore.save(lpaUID, JSON.stringify(lpa)); - respond(); - break; - } - case 'POST': { - if (context.request.path == '/lpas') { - let uids = JSON.parse(context.request.body).uids; - let lpas = uids.map(uid => lpaStore.load(uid)).reduce((list, lpa) => lpa ? list.concat([JSON.parse(lpa)]) : list, []); - - respond().withContent(JSON.stringify({ lpas: lpas })); - } else { - let update = JSON.parse(context.request.body); - let lpa = JSON.parse(lpaStore.load(lpaUID)); - if (!lpa) { - respond().withStatusCode(404); + case 'PUT': { + let lpa = JSON.parse(context.request.body); + lpa.uid = lpaUID; + lpa.updatedAt = new Date(Date.now()).toISOString(); + lpaStore.save(lpaUID, JSON.stringify(lpa)); + respond(); break; - } - lpa.updatedAt = new Date(Date.now()).toISOString(); + } + case 'POST': { + if (context.request.path == '/lpas') { + let uids = JSON.parse(context.request.body).uids; + let lpas = uids.map(uid => lpaStore.load(uid)).reduce((list, lpa) => lpa ? list.concat([JSON.parse(lpa)]) : list, []); - switch (update.type) { - case 'ATTORNEY_SIGN': { - const keyParts = update.changes[0].key.split('/'); - const idx = parseInt(keyParts[2]); + respond().withContent(JSON.stringify({ lpas: lpas })); + } else { + let update = JSON.parse(context.request.body); + let lpa = JSON.parse(lpaStore.load(lpaUID)); + if (!lpa) { + respond().withStatusCode(404); + break; + } + lpa.updatedAt = new Date(Date.now()).toISOString(); - if (lpa.attorneys && idx < lpa.attorneys.length) { - lpa.attorneys[idx].signedAt = lpa.signedAt; - } - break; - } - case 'TRUST_CORPORATION_SIGN': { - const keyParts = update.changes[0].key.split('/'); - const idx = parseInt(keyParts[2]); + switch (update.type) { + case 'ATTORNEY_SIGN': { + const keyParts = update.changes[0].key.split('/'); + const idx = parseInt(keyParts[2]); + const signedAt = update.changes.find(x => x.key.includes('signedAt')).new; - if (lpa.trustCorporations && idx < lpa.trustCorporations.length) { - lpa.trustCorporations[idx].signatories = [{ signedAt: lpa.signedAt }]; - } - break; - } - case 'CERTIFICATE_PROVIDER_SIGN': - lpa.certificateProvider.signedAt = lpa.signedAt; - break; + if (lpa.attorneys && idx < lpa.attorneys.length) { + lpa.attorneys[idx].signedAt = signedAt; + } + break; + } + case 'TRUST_CORPORATION_SIGN': { + const keyParts = update.changes[0].key.split('/'); + const idx = parseInt(keyParts[2]); + const signedAt = update.changes.find(x => x.key.includes('signedAt')).new; + + if (lpa.trustCorporations && idx < lpa.trustCorporations.length) { + lpa.trustCorporations[idx].signatories = [{ firstNames: "A", lastName: "Sign", signedAt: signedAt }]; + } + break; + } + case 'CERTIFICATE_PROVIDER_SIGN': + const signedAt = update.changes.find(x => x.key.includes('signedAt')).new; + lpa.certificateProvider.signedAt = signedAt; + break; - case 'PERFECT': - lpa.status = 'perfect'; - break; + case 'PERFECT': + lpa.status = 'perfect'; + break; - case 'REGISTER': - if (lpa.status === 'perfect') { - lpa.status = 'registered'; - lpa.registrationDate = new Date(Date.now()).toISOString(); - } - break; + case 'REGISTER': + if (lpa.status === 'perfect') { + lpa.status = 'registered'; + lpa.registrationDate = new Date(Date.now()).toISOString(); + } + break; - case 'CERTIFICATE_PROVIDER_OPT_OUT': - lpa.status = 'cannot-register'; - break; + case 'CERTIFICATE_PROVIDER_OPT_OUT': + lpa.status = 'cannot-register'; + break; - case 'DONOR_WITHDRAW_LPA': - lpa.status = 'withdrawn'; - break; + case 'DONOR_WITHDRAW_LPA': + lpa.status = 'withdrawn'; + break; - case 'ATTORNEY_OPT_OUT': - const idx = lpa.attorneys.findIndex(item => item.uid === update.subject) + case 'ATTORNEY_OPT_OUT': + const idx = lpa.attorneys.findIndex(item => item.uid === update.subject) - if (idx >= 0 && lpa.attorneys[idx].signedAt != '') { - lpa.attorneys[idx].status = 'removed' - } - break; + if (idx >= 0 && lpa.attorneys[idx].signedAt != '') { + lpa.attorneys[idx].status = 'removed' + } + break; - } + } - lpaStore.save(lpaUID, JSON.stringify(lpa)); - respond(); + lpaStore.save(lpaUID, JSON.stringify(lpa)); + respond(); + } + break; } - break; - } - default: - respond(); + default: + respond(); } diff --git a/internal/actor/actor.go b/internal/actor/actor.go index f2a6f053a7..4e41eda1ce 100644 --- a/internal/actor/actor.go +++ b/internal/actor/actor.go @@ -8,3 +8,7 @@ type Actor struct { FirstNames string LastName string } + +func (a Actor) FullName() string { + return a.FirstNames + " " + a.LastName +} diff --git a/internal/actor/actor_test.go b/internal/actor/actor_test.go new file mode 100644 index 0000000000..547a05d3d3 --- /dev/null +++ b/internal/actor/actor_test.go @@ -0,0 +1,11 @@ +package actor + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestActorFullName(t *testing.T) { + assert.Equal(t, "John Smith", Actor{FirstNames: "John", LastName: "Smith"}.FullName()) +} diff --git a/internal/donor/donordata/authorised_signatory.go b/internal/donor/donordata/authorised_signatory.go index 4aef694c6d..30cfa18344 100644 --- a/internal/donor/donordata/authorised_signatory.go +++ b/internal/donor/donordata/authorised_signatory.go @@ -1,9 +1,14 @@ package donordata -import "fmt" +import ( + "fmt" + + "github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid" +) // AuthorisedSignatory contains details of the person who will sign the LPA on the donor's behalf type AuthorisedSignatory struct { + UID actoruid.UID FirstNames string LastName string } diff --git a/internal/donor/donordata/independent_witness.go b/internal/donor/donordata/independent_witness.go index 651839353f..d8c697a373 100644 --- a/internal/donor/donordata/independent_witness.go +++ b/internal/donor/donordata/independent_witness.go @@ -3,11 +3,13 @@ package donordata import ( "fmt" + "github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid" "github.com/ministryofjustice/opg-modernising-lpa/internal/place" ) // IndependentWitness contains details of the person who will also witness the signing of the LPA type IndependentWitness struct { + UID actoruid.UID FirstNames string LastName string HasNonUKMobile bool diff --git a/internal/donor/donordata/provided_test.go b/internal/donor/donordata/provided_test.go index b2d6cf249b..9d72259d57 100644 --- a/internal/donor/donordata/provided_test.go +++ b/internal/donor/donordata/provided_test.go @@ -36,14 +36,14 @@ func TestGenerateHash(t *testing.T) { } // DO change this value to match the updates - const modified uint64 = 0xfd5454f5d9c33092 + const modified uint64 = 0x3556b423a27f17b8 // DO NOT change these initial hash values. If a field has been added/removed // you will need to handle the version gracefully by modifying // (*Provided).HashInclude and adding another testcase for the new // version. testcases := map[uint8]uint64{ - 0: 0xf43fbd1d67d4baf8, + 0: 0x38b7d0fbfbe9aff9, } for version, initial := range testcases { @@ -93,13 +93,13 @@ func TestGenerateCheckedHash(t *testing.T) { } // DO change this value to match the updates - const modified uint64 = 0xaca608ad8e0a588d + const modified uint64 = 0x51d901b0a335d248 // DO NOT change these initial hash values. If a field has been added/removed // you will need to handle the version gracefully by modifying // toCheck.HashInclude and adding another testcase for the new version. testcases := map[uint8]uint64{ - 0: 0xc354aa0f0c97e090, + 0: 0x8681da14cea4a7f4, } for version, initial := range testcases { diff --git a/internal/donor/donorpage/register.go b/internal/donor/donorpage/register.go index efa40acf5c..02e398934d 100644 --- a/internal/donor/donorpage/register.go +++ b/internal/donor/donorpage/register.go @@ -207,6 +207,9 @@ func Register( handleWithDonor := makeLpaHandle(rootMux, sessionStore, errorHandler, donorStore) + handleWithDonor(donor.PathViewLPA, page.None, + ViewLpa(tmpls.Get("view_lpa.gohtml"), lpaStoreClient)) + handleWithDonor(donor.PathDeleteThisLpa, page.None, DeleteLpa(tmpls.Get("delete_this_lpa.gohtml"), donorStore)) handleWithDonor(donor.PathWithdrawThisLpa, page.None, @@ -335,9 +338,9 @@ func Register( handleWithDonor(donor.PathGettingHelpSigning, page.CanGoBack, Guidance(tmpls.Get("getting_help_signing.gohtml"))) handleWithDonor(donor.PathYourAuthorisedSignatory, page.CanGoBack, - YourAuthorisedSignatory(tmpls.Get("your_authorised_signatory.gohtml"), donorStore)) + YourAuthorisedSignatory(tmpls.Get("your_authorised_signatory.gohtml"), donorStore, actoruid.New)) handleWithDonor(donor.PathYourIndependentWitness, page.CanGoBack, - YourIndependentWitness(tmpls.Get("your_independent_witness.gohtml"), donorStore)) + YourIndependentWitness(tmpls.Get("your_independent_witness.gohtml"), donorStore, actoruid.New)) handleWithDonor(donor.PathYourIndependentWitnessMobile, page.CanGoBack, YourIndependentWitnessMobile(tmpls.Get("your_independent_witness_mobile.gohtml"), donorStore)) handleWithDonor(donor.PathYourIndependentWitnessAddress, page.CanGoBack, diff --git a/internal/donor/donorpage/view_lpa.go b/internal/donor/donorpage/view_lpa.go new file mode 100644 index 0000000000..d6661a2a98 --- /dev/null +++ b/internal/donor/donorpage/view_lpa.go @@ -0,0 +1,31 @@ +package donorpage + +import ( + "net/http" + + "github.com/ministryofjustice/opg-go-common/template" + "github.com/ministryofjustice/opg-modernising-lpa/internal/appcontext" + "github.com/ministryofjustice/opg-modernising-lpa/internal/donor/donordata" + "github.com/ministryofjustice/opg-modernising-lpa/internal/lpastore/lpadata" + "github.com/ministryofjustice/opg-modernising-lpa/internal/validation" +) + +type viewLpaData struct { + App appcontext.Data + Errors validation.List + Lpa *lpadata.Lpa +} + +func ViewLpa(tmpl template.Template, lpaStoreClient LpaStoreClient) Handler { + return func(appData appcontext.Data, w http.ResponseWriter, r *http.Request, donor *donordata.Provided) error { + lpa, err := lpaStoreClient.Lpa(r.Context(), donor.LpaUID) + if err != nil { + return err + } + + return tmpl(w, &viewLpaData{ + App: appData, + Lpa: lpa, + }) + } +} diff --git a/internal/donor/donorpage/view_lpa_test.go b/internal/donor/donorpage/view_lpa_test.go new file mode 100644 index 0000000000..0bd854c272 --- /dev/null +++ b/internal/donor/donorpage/view_lpa_test.go @@ -0,0 +1,67 @@ +package donorpage + +import ( + "net/http" + "net/http/httptest" + "testing" + + "github.com/ministryofjustice/opg-modernising-lpa/internal/donor/donordata" + "github.com/ministryofjustice/opg-modernising-lpa/internal/lpastore/lpadata" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestViewLpa(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodGet, "/", nil) + + donor := &donordata.Provided{LpaUID: "M-0000"} + lpa := &lpadata.Lpa{LpaUID: "M-0000"} + + lpaStoreClient := newMockLpaStoreClient(t) + lpaStoreClient.EXPECT(). + Lpa(r.Context(), "M-0000"). + Return(lpa, nil) + + template := newMockTemplate(t) + template.EXPECT(). + Execute(w, &viewLpaData{App: testAppData, Lpa: lpa}). + Return(nil) + + err := ViewLpa(template.Execute, lpaStoreClient)(testAppData, w, r, donor) + resp := w.Result() + + assert.Nil(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) +} + +func TestViewLpaWhenLpaStoreErrors(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodGet, "/", nil) + + lpaStoreClient := newMockLpaStoreClient(t) + lpaStoreClient.EXPECT(). + Lpa(r.Context(), mock.Anything). + Return(nil, expectedError) + + err := ViewLpa(nil, lpaStoreClient)(testAppData, w, r, &donordata.Provided{}) + assert.Equal(t, expectedError, err) +} + +func TestViewLpaWhenTemplateErrors(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodGet, "/", nil) + + lpaStoreClient := newMockLpaStoreClient(t) + lpaStoreClient.EXPECT(). + Lpa(r.Context(), mock.Anything). + Return(&lpadata.Lpa{}, nil) + + template := newMockTemplate(t) + template.EXPECT(). + Execute(w, mock.Anything). + Return(expectedError) + + err := ViewLpa(template.Execute, lpaStoreClient)(testAppData, w, r, &donordata.Provided{}) + assert.Equal(t, expectedError, err) +} diff --git a/internal/donor/donorpage/your_authorised_signatory.go b/internal/donor/donorpage/your_authorised_signatory.go index d4063b6085..5ce7b881ac 100644 --- a/internal/donor/donorpage/your_authorised_signatory.go +++ b/internal/donor/donorpage/your_authorised_signatory.go @@ -6,6 +6,7 @@ import ( "github.com/ministryofjustice/opg-go-common/template" "github.com/ministryofjustice/opg-modernising-lpa/internal/actor" + "github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid" "github.com/ministryofjustice/opg-modernising-lpa/internal/appcontext" "github.com/ministryofjustice/opg-modernising-lpa/internal/donor" "github.com/ministryofjustice/opg-modernising-lpa/internal/donor/donordata" @@ -21,7 +22,7 @@ type yourAuthorisedSignatoryData struct { NameWarning *actor.SameNameWarning } -func YourAuthorisedSignatory(tmpl template.Template, donorStore DonorStore) Handler { +func YourAuthorisedSignatory(tmpl template.Template, donorStore DonorStore, newUID func() actoruid.UID) Handler { return func(appData appcontext.Data, w http.ResponseWriter, r *http.Request, provided *donordata.Provided) error { data := &yourAuthorisedSignatoryData{ App: appData, @@ -47,6 +48,10 @@ func YourAuthorisedSignatory(tmpl template.Template, donorStore DonorStore) Hand } if data.Errors.None() && data.NameWarning == nil { + if provided.AuthorisedSignatory.UID.IsZero() { + provided.AuthorisedSignatory.UID = newUID() + } + provided.AuthorisedSignatory.FirstNames = data.Form.FirstNames provided.AuthorisedSignatory.LastName = data.Form.LastName diff --git a/internal/donor/donorpage/your_authorised_signatory_test.go b/internal/donor/donorpage/your_authorised_signatory_test.go index 5d05e9031a..6c149fd101 100644 --- a/internal/donor/donorpage/your_authorised_signatory_test.go +++ b/internal/donor/donorpage/your_authorised_signatory_test.go @@ -30,7 +30,7 @@ func TestGetYourAuthorisedSignatory(t *testing.T) { }). Return(nil) - err := YourAuthorisedSignatory(template.Execute, nil)(testAppData, w, r, &donordata.Provided{}) + err := YourAuthorisedSignatory(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{}) resp := w.Result() assert.Nil(t, err) @@ -51,7 +51,7 @@ func TestGetYourAuthorisedSignatoryFromStore(t *testing.T) { }). Return(nil) - err := YourAuthorisedSignatory(template.Execute, nil)(testAppData, w, r, &donordata.Provided{ + err := YourAuthorisedSignatory(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{ AuthorisedSignatory: donordata.AuthorisedSignatory{ FirstNames: "John", }, @@ -71,7 +71,7 @@ func TestGetYourAuthorisedSignatoryWhenTemplateErrors(t *testing.T) { Execute(w, mock.Anything). Return(expectedError) - err := YourAuthorisedSignatory(template.Execute, nil)(testAppData, w, r, &donordata.Provided{}) + err := YourAuthorisedSignatory(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{}) resp := w.Result() assert.Equal(t, expectedError, err) @@ -89,6 +89,7 @@ func TestPostYourAuthorisedSignatory(t *testing.T) { "last-name": {"Doe"}, }, person: donordata.AuthorisedSignatory{ + UID: testUID, FirstNames: "John", LastName: "Doe", }, @@ -100,6 +101,7 @@ func TestPostYourAuthorisedSignatory(t *testing.T) { "ignore-name-warning": {actor.NewSameNameWarning(actor.TypeAuthorisedSignatory, actor.TypeDonor, "John", "Smith").String()}, }, person: donordata.AuthorisedSignatory{ + UID: testUID, FirstNames: "John", LastName: "Smith", }, @@ -123,7 +125,7 @@ func TestPostYourAuthorisedSignatory(t *testing.T) { }). Return(nil) - err := YourAuthorisedSignatory(nil, donorStore)(testAppData, w, r, &donordata.Provided{ + err := YourAuthorisedSignatory(nil, donorStore, testUIDFn)(testAppData, w, r, &donordata.Provided{ LpaID: "lpa-id", Donor: donordata.Donor{FirstNames: "John", LastName: "Smith"}, }) @@ -152,6 +154,7 @@ func TestPostYourAuthorisedSignatoryWhenTaskCompleted(t *testing.T) { Put(r.Context(), &donordata.Provided{ LpaID: "lpa-id", AuthorisedSignatory: donordata.AuthorisedSignatory{ + UID: testUID, FirstNames: "John", LastName: "Doe", }, @@ -159,7 +162,7 @@ func TestPostYourAuthorisedSignatoryWhenTaskCompleted(t *testing.T) { }). Return(nil) - err := YourAuthorisedSignatory(nil, donorStore)(testAppData, w, r, &donordata.Provided{ + err := YourAuthorisedSignatory(nil, donorStore, testUIDFn)(testAppData, w, r, &donordata.Provided{ LpaID: "lpa-id", AuthorisedSignatory: donordata.AuthorisedSignatory{ FirstNames: "John", @@ -229,7 +232,7 @@ func TestPostYourAuthorisedSignatoryWhenInputRequired(t *testing.T) { })). Return(nil) - err := YourAuthorisedSignatory(template.Execute, nil)(testAppData, w, r, &donordata.Provided{ + err := YourAuthorisedSignatory(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{ Donor: donordata.Donor{ FirstNames: "John", LastName: "Doe", @@ -258,7 +261,7 @@ func TestPostYourAuthorisedSignatoryWhenStoreErrors(t *testing.T) { Put(r.Context(), mock.Anything). Return(expectedError) - err := YourAuthorisedSignatory(nil, donorStore)(testAppData, w, r, &donordata.Provided{ + err := YourAuthorisedSignatory(nil, donorStore, testUIDFn)(testAppData, w, r, &donordata.Provided{ Donor: donordata.Donor{ FirstNames: "John", Address: place.Address{Line1: "abc"}, diff --git a/internal/donor/donorpage/your_independent_witness.go b/internal/donor/donorpage/your_independent_witness.go index 9a6f1171b1..b6deaea2a4 100644 --- a/internal/donor/donorpage/your_independent_witness.go +++ b/internal/donor/donorpage/your_independent_witness.go @@ -6,6 +6,7 @@ import ( "github.com/ministryofjustice/opg-go-common/template" "github.com/ministryofjustice/opg-modernising-lpa/internal/actor" + "github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid" "github.com/ministryofjustice/opg-modernising-lpa/internal/appcontext" "github.com/ministryofjustice/opg-modernising-lpa/internal/donor" "github.com/ministryofjustice/opg-modernising-lpa/internal/donor/donordata" @@ -21,7 +22,7 @@ type yourIndependentWitnessData struct { NameWarning *actor.SameNameWarning } -func YourIndependentWitness(tmpl template.Template, donorStore DonorStore) Handler { +func YourIndependentWitness(tmpl template.Template, donorStore DonorStore, newUID func() actoruid.UID) Handler { return func(appData appcontext.Data, w http.ResponseWriter, r *http.Request, provided *donordata.Provided) error { data := &yourIndependentWitnessData{ App: appData, @@ -47,6 +48,10 @@ func YourIndependentWitness(tmpl template.Template, donorStore DonorStore) Handl } if data.Errors.None() && data.NameWarning == nil { + if provided.IndependentWitness.UID.IsZero() { + provided.IndependentWitness.UID = newUID() + } + provided.IndependentWitness.FirstNames = data.Form.FirstNames provided.IndependentWitness.LastName = data.Form.LastName diff --git a/internal/donor/donorpage/your_independent_witness_test.go b/internal/donor/donorpage/your_independent_witness_test.go index 7c8adc0a26..485b8348ae 100644 --- a/internal/donor/donorpage/your_independent_witness_test.go +++ b/internal/donor/donorpage/your_independent_witness_test.go @@ -30,7 +30,7 @@ func TestGetYourIndependentWitness(t *testing.T) { }). Return(nil) - err := YourIndependentWitness(template.Execute, nil)(testAppData, w, r, &donordata.Provided{}) + err := YourIndependentWitness(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{}) resp := w.Result() assert.Nil(t, err) @@ -51,7 +51,7 @@ func TestGetYourIndependentWitnessFromStore(t *testing.T) { }). Return(nil) - err := YourIndependentWitness(template.Execute, nil)(testAppData, w, r, &donordata.Provided{ + err := YourIndependentWitness(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{ IndependentWitness: donordata.IndependentWitness{ FirstNames: "John", }, @@ -71,7 +71,7 @@ func TestGetYourIndependentWitnessWhenTemplateErrors(t *testing.T) { Execute(w, mock.Anything). Return(expectedError) - err := YourIndependentWitness(template.Execute, nil)(testAppData, w, r, &donordata.Provided{}) + err := YourIndependentWitness(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{}) resp := w.Result() assert.Equal(t, expectedError, err) @@ -89,6 +89,7 @@ func TestPostYourIndependentWitness(t *testing.T) { "last-name": {"Doe"}, }, person: donordata.IndependentWitness{ + UID: testUID, FirstNames: "John", LastName: "Doe", }, @@ -100,6 +101,7 @@ func TestPostYourIndependentWitness(t *testing.T) { "ignore-name-warning": {actor.NewSameNameWarning(actor.TypeIndependentWitness, actor.TypeDonor, "John", "Smith").String()}, }, person: donordata.IndependentWitness{ + UID: testUID, FirstNames: "John", LastName: "Smith", }, @@ -123,7 +125,7 @@ func TestPostYourIndependentWitness(t *testing.T) { }). Return(nil) - err := YourIndependentWitness(nil, donorStore)(testAppData, w, r, &donordata.Provided{ + err := YourIndependentWitness(nil, donorStore, testUIDFn)(testAppData, w, r, &donordata.Provided{ LpaID: "lpa-id", Donor: donordata.Donor{FirstNames: "John", LastName: "Smith"}, }) @@ -152,6 +154,7 @@ func TestPostYourIndependentWitnessWhenTaskCompleted(t *testing.T) { Put(r.Context(), &donordata.Provided{ LpaID: "lpa-id", IndependentWitness: donordata.IndependentWitness{ + UID: testUID, FirstNames: "John", LastName: "Doe", }, @@ -159,7 +162,7 @@ func TestPostYourIndependentWitnessWhenTaskCompleted(t *testing.T) { }). Return(nil) - err := YourIndependentWitness(nil, donorStore)(testAppData, w, r, &donordata.Provided{ + err := YourIndependentWitness(nil, donorStore, testUIDFn)(testAppData, w, r, &donordata.Provided{ LpaID: "lpa-id", IndependentWitness: donordata.IndependentWitness{ FirstNames: "John", @@ -229,7 +232,7 @@ func TestPostYourIndependentWitnessWhenInputRequired(t *testing.T) { })). Return(nil) - err := YourIndependentWitness(template.Execute, nil)(testAppData, w, r, &donordata.Provided{ + err := YourIndependentWitness(template.Execute, nil, nil)(testAppData, w, r, &donordata.Provided{ Donor: donordata.Donor{ FirstNames: "John", LastName: "Doe", @@ -258,7 +261,7 @@ func TestPostYourIndependentWitnessWhenStoreErrors(t *testing.T) { Put(r.Context(), mock.Anything). Return(expectedError) - err := YourIndependentWitness(nil, donorStore)(testAppData, w, r, &donordata.Provided{ + err := YourIndependentWitness(nil, donorStore, testUIDFn)(testAppData, w, r, &donordata.Provided{ Donor: donordata.Donor{ FirstNames: "John", Address: place.Address{Line1: "abc"}, diff --git a/internal/donor/path.go b/internal/donor/path.go index 9fc89a24fb..9843ee086a 100644 --- a/internal/donor/path.go +++ b/internal/donor/path.go @@ -95,6 +95,7 @@ const ( PathUploadEvidence = Path("/upload-evidence") PathUploadEvidenceSSE = Path("/upload-evidence-sse") PathUseExistingAddress = Path("/use-existing-address") + PathViewLPA = Path("/view-lpa") PathWeHaveContactedVoucher = Path("/we-have-contacted-voucher") PathWeHaveReceivedVoucherDetails = Path("/we-have-received-voucher-details") PathWeHaveUpdatedYourDetails = Path("/we-have-updated-your-details") diff --git a/internal/lpastore/lpa.go b/internal/lpastore/lpa.go index f3745a219f..b5185ca28d 100644 --- a/internal/lpastore/lpa.go +++ b/internal/lpastore/lpa.go @@ -489,20 +489,21 @@ func FromDonorProvidedDetails(l *donordata.Provided) *lpadata.Lpa { var authorisedSignatory actor.Actor if v := l.AuthorisedSignatory; v.FirstNames != "" { authorisedSignatory = actor.Actor{ - // TODO: add UID for this actor Type: actor.TypeAuthorisedSignatory, + UID: v.UID, FirstNames: v.FirstNames, LastName: v.LastName, } } - var independentWitness actor.Actor + var independentWitness lpadata.IndependentWitness if v := l.IndependentWitness; v.FirstNames != "" { - independentWitness = actor.Actor{ - // TODO: add UID for this actor - Type: actor.TypeIndependentWitness, + independentWitness = lpadata.IndependentWitness{ + UID: v.UID, FirstNames: v.FirstNames, LastName: v.LastName, + Mobile: v.Mobile, + Address: v.Address, } } diff --git a/internal/lpastore/lpadata/independent_witness.go b/internal/lpastore/lpadata/independent_witness.go new file mode 100644 index 0000000000..4c7996c54d --- /dev/null +++ b/internal/lpastore/lpadata/independent_witness.go @@ -0,0 +1,18 @@ +package lpadata + +import ( + "github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid" + "github.com/ministryofjustice/opg-modernising-lpa/internal/place" +) + +type IndependentWitness struct { + UID actoruid.UID + FirstNames string + LastName string + Mobile string + Address place.Address +} + +func (w IndependentWitness) FullName() string { + return w.FirstNames + " " + w.LastName +} diff --git a/internal/lpastore/lpadata/independent_witness_test.go b/internal/lpastore/lpadata/independent_witness_test.go new file mode 100644 index 0000000000..f927416e66 --- /dev/null +++ b/internal/lpastore/lpadata/independent_witness_test.go @@ -0,0 +1,11 @@ +package lpadata + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestIndependentWitnessFullName(t *testing.T) { + assert.Equal(t, "John Smith", IndependentWitness{FirstNames: "John", LastName: "Smith"}.FullName()) +} diff --git a/internal/lpastore/lpadata/lpa.go b/internal/lpastore/lpadata/lpa.go index a9cda0d7f7..119e00a881 100644 --- a/internal/lpastore/lpadata/lpa.go +++ b/internal/lpastore/lpadata/lpa.go @@ -32,7 +32,7 @@ type Lpa struct { WhenCanTheLpaBeUsed CanBeUsedWhen LifeSustainingTreatmentOption LifeSustainingTreatment AuthorisedSignatory actor.Actor - IndependentWitness actor.Actor + IndependentWitness IndependentWitness // SignedAt is the date the Donor signed their LPA (and signifies it has been // witnessed by their CertificateProvider) @@ -167,7 +167,12 @@ func (l Lpa) Actors() iter.Seq[actor.Actor] { } if !l.IndependentWitness.UID.IsZero() { - if !yield(l.IndependentWitness) { + if !yield(actor.Actor{ + Type: actor.TypeIndependentWitness, + UID: l.IndependentWitness.UID, + FirstNames: l.IndependentWitness.FirstNames, + LastName: l.IndependentWitness.LastName, + }) { return } } diff --git a/internal/lpastore/lpadata/lpa_test.go b/internal/lpastore/lpadata/lpa_test.go index 8a3865df70..10dfbb0bf0 100644 --- a/internal/lpastore/lpadata/lpa_test.go +++ b/internal/lpastore/lpadata/lpa_test.go @@ -93,7 +93,6 @@ func TestLpaCorrespondentEmailWhenCorrespondentProvided(t *testing.T) { func TestLpaActors(t *testing.T) { authorisedSignatory := actor.Actor{UID: actoruid.New()} - independentWitness := actor.Actor{UID: actoruid.New()} lpa := &Lpa{ Donor: Donor{ @@ -136,9 +135,13 @@ func TestLpaActors(t *testing.T) { LastName: "Person", }}, AuthorisedSignatory: authorisedSignatory, - IndependentWitness: independentWitness, - Correspondent: Correspondent{FirstNames: "Nope"}, - Voucher: Voucher{FirstNames: "Nada"}, + IndependentWitness: IndependentWitness{ + UID: actoruid.New(), + FirstNames: "Ind", + LastName: "Wit", + }, + Correspondent: Correspondent{FirstNames: "Nope"}, + Voucher: Voucher{FirstNames: "Nada"}, } actors := slices.Collect(lpa.Actors()) @@ -178,10 +181,12 @@ func TestLpaActors(t *testing.T) { UID: lpa.PeopleToNotify[0].UID, FirstNames: "Peter", LastName: "Person", - }, - authorisedSignatory, - independentWitness, - }, actors) + }, authorisedSignatory, { + Type: actor.TypeIndependentWitness, + UID: lpa.IndependentWitness.UID, + FirstNames: "Ind", + LastName: "Wit", + }}, actors) } func TestAttorney(t *testing.T) { diff --git a/internal/lpastore/lpadata/trust_corporation_signatory.go b/internal/lpastore/lpadata/trust_corporation_signatory.go index 8c4c2a1c4b..3ea7657057 100644 --- a/internal/lpastore/lpadata/trust_corporation_signatory.go +++ b/internal/lpastore/lpadata/trust_corporation_signatory.go @@ -8,3 +8,7 @@ type TrustCorporationSignatory struct { ProfessionalTitle string `json:"professionalTitle"` SignedAt time.Time `json:"signedAt"` } + +func (s TrustCorporationSignatory) FullName() string { + return s.FirstNames + " " + s.LastName +} diff --git a/internal/lpastore/lpadata/trust_corporation_signatory_test.go b/internal/lpastore/lpadata/trust_corporation_signatory_test.go new file mode 100644 index 0000000000..c51c40f4b7 --- /dev/null +++ b/internal/lpastore/lpadata/trust_corporation_signatory_test.go @@ -0,0 +1,11 @@ +package lpadata + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestTrustCorporationSignatoryFullName(t *testing.T) { + assert.Equal(t, "John Smith", TrustCorporationSignatory{FirstNames: "John", LastName: "Smith"}.FullName()) +} diff --git a/internal/lpastore/resolving_service.go b/internal/lpastore/resolving_service.go index 8c4a698f7b..47b145797d 100644 --- a/internal/lpastore/resolving_service.go +++ b/internal/lpastore/resolving_service.go @@ -116,6 +116,7 @@ func (s *ResolvingService) merge(lpa *lpadata.Lpa, donor *donordata.Provided) *l if lpa.AuthorisedSignatory.FirstNames == "" && donor.AuthorisedSignatory.FirstNames != "" { lpa.AuthorisedSignatory = actor.Actor{ Type: actor.TypeAuthorisedSignatory, + UID: donor.AuthorisedSignatory.UID, FirstNames: donor.AuthorisedSignatory.FirstNames, LastName: donor.AuthorisedSignatory.LastName, } @@ -123,10 +124,12 @@ func (s *ResolvingService) merge(lpa *lpadata.Lpa, donor *donordata.Provided) *l // TODO: remove this once independent witness is in lpa-store if lpa.IndependentWitness.FirstNames == "" && donor.IndependentWitness.FirstNames != "" { - lpa.IndependentWitness = actor.Actor{ - Type: actor.TypeIndependentWitness, + lpa.IndependentWitness = lpadata.IndependentWitness{ + UID: donor.IndependentWitness.UID, FirstNames: donor.IndependentWitness.FirstNames, LastName: donor.IndependentWitness.LastName, + Mobile: donor.IndependentWitness.Mobile, + Address: donor.IndependentWitness.Address, } } diff --git a/internal/lpastore/resolving_service_test.go b/internal/lpastore/resolving_service_test.go index 57a0ea627e..34e2858620 100644 --- a/internal/lpastore/resolving_service_test.go +++ b/internal/lpastore/resolving_service_test.go @@ -70,8 +70,7 @@ func TestResolvingServiceGet(t *testing.T) { FirstNames: "A", LastName: "S", }, - IndependentWitness: actor.Actor{ - Type: actor.TypeIndependentWitness, + IndependentWitness: lpadata.IndependentWitness{ FirstNames: "I", LastName: "W", }, @@ -133,8 +132,7 @@ func TestResolvingServiceGet(t *testing.T) { FirstNames: "A", LastName: "S", }, - IndependentWitness: actor.Actor{ - Type: actor.TypeIndependentWitness, + IndependentWitness: lpadata.IndependentWitness{ FirstNames: "I", LastName: "W", }, diff --git a/internal/page/fixtures/donor.go b/internal/page/fixtures/donor.go index 75a99d30fa..01654c04d8 100644 --- a/internal/page/fixtures/donor.go +++ b/internal/page/fixtures/donor.go @@ -484,7 +484,7 @@ func updateLPAProgress( } certificateProvider.ContactLanguagePreference = localize.En - certificateProvider.SignedAt = time.Now() + certificateProvider.SignedAt = donorDetails.SignedAt.AddDate(0, 0, 3) if err := certificateProviderStore.Put(ctx, certificateProvider); err != nil { return nil, nil, err @@ -521,7 +521,7 @@ func updateLPAProgress( attorney.Tasks.ConfirmYourDetails = task.StateCompleted attorney.Tasks.ReadTheLpa = task.StateCompleted attorney.Tasks.SignTheLpa = task.StateCompleted - attorney.SignedAt = donorDetails.SignedAt.Add(2 * time.Hour) + attorney.SignedAt = donorDetails.SignedAt.AddDate(0, 0, 10) if err := attorneyStore.Put(ctx, attorney); err != nil { return nil, nil, err @@ -558,7 +558,7 @@ func updateLPAProgress( FirstNames: "A", LastName: "Sign", ProfessionalTitle: "Assistant to the signer", - SignedAt: donorDetails.SignedAt.Add(2 * time.Hour), + SignedAt: donorDetails.SignedAt.AddDate(0, 0, 15), }} if err := attorneyStore.Put(ctx, attorney); err != nil { diff --git a/internal/templatefn/fn.go b/internal/templatefn/fn.go index 39e7e73ac2..64c487cc5a 100644 --- a/internal/templatefn/fn.go +++ b/internal/templatefn/fn.go @@ -87,6 +87,7 @@ func All(globals *Globals) map[string]any { "checkboxEq": checkboxEq, "lpaDecisions": lpaDecisions, "summaryRow": summaryRow, + "staticSummaryRow": staticSummaryRow, } } @@ -512,3 +513,14 @@ func summaryRow(app appcontext.Data, label string, value any, changeLink, fullNa "SummarisingSelf": summarisingSelf, } } + +// staticSummaryRow prevents space being left for possible actions, so it should +// only be used in a list where no row is using summaryRow. +func staticSummaryRow(app appcontext.Data, label string, value any) map[string]any { + return map[string]any{ + "App": app, + "Label": label, + "Value": value, + "Static": true, + } +} diff --git a/internal/templatefn/fn_test.go b/internal/templatefn/fn_test.go index db109328be..a4df820ca7 100644 --- a/internal/templatefn/fn_test.go +++ b/internal/templatefn/fn_test.go @@ -584,3 +584,16 @@ func TestSummaryRow(t *testing.T) { "SummarisingSelf": true, }, summaryRow(app, label, value, changeLink, fullName, true, true)) } + +func TestStaticSummaryRow(t *testing.T) { + app := appcontext.Data{SessionID: "abc"} + label := "a-label" + value := "aValue" + + assert.Equal(t, map[string]any{ + "App": app, + "Label": label, + "Value": value, + "Static": true, + }, staticSummaryRow(app, label, value)) +} diff --git a/internal/templatefn/paths.go b/internal/templatefn/paths.go index 6e79e13ca3..b5f254f743 100644 --- a/internal/templatefn/paths.go +++ b/internal/templatefn/paths.go @@ -214,6 +214,7 @@ type appPaths struct { UploadEvidence donor.Path UploadEvidenceSSE donor.Path UseExistingAddress donor.Path + ViewLPA donor.Path WeHaveContactedVoucher donor.Path WeHaveReceivedVoucherDetails donor.Path WeHaveUpdatedYourDetails donor.Path @@ -443,6 +444,7 @@ var paths = appPaths{ UploadEvidence: donor.PathUploadEvidence, UploadEvidenceSSE: donor.PathUploadEvidenceSSE, UseExistingAddress: donor.PathUseExistingAddress, + ViewLPA: donor.PathViewLPA, WeHaveContactedVoucher: donor.PathWeHaveContactedVoucher, WeHaveReceivedVoucherDetails: donor.PathWeHaveReceivedVoucherDetails, WeHaveUpdatedYourDetails: donor.PathWeHaveUpdatedYourDetails, diff --git a/lang/cy.json b/lang/cy.json index b163325e69..88a7cbefdb 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -333,7 +333,7 @@ "iHaveNotChosenToNotifyAnyone": "rwyf wedi dewis peidio â hysbysu unrhyw un am fy LPA", "infoIProvidedCanBeUsedByOpg": "gall y wybodaeth a ddarparwyd gennyf gael ei defnyddio gan Swyddfa’r Gwarcheidwad Cyhoeddus wrth gyflawni ei dyletswyddau", "whenYouTickAndClick": "Pan fyddwch yn ticio’r blychau hyn ac yn dewis ‘Cyflwyno fy llofnod’, rydych yn llofnodi eich LPA yn gyfreithiol ac yn ei chyflwyno fel gweithred.", - "iConfirmThat": "Rwyf i, {{ .DonorFullName }}, yn cadarnhau:", + "iNameConfirmThat": "Rwyf i, {{ .DonorFullName }}, yn cadarnhau:", "wantToApply": "Fy mod eisiau gwneud cais i gofrestru’r LPA hon", "howTickingActsAsSignature": "Sut mae ticio’r blychau yn gweithredu fel eich llofnod cyfreithiol", "howTickingActsAsSignatureContent": "

Mae llofnodion electronig yn cael eu cydnabod mewn cyfraith yng Nghymru a Lloegr. Maent yn ei gwneud yn haws i chi lofnodi dogfennau ar-lein.

Drwy roi tic yn y ddau flwch a dewis ‘Cyflwyno fy llofnod’, rydych yn darparu eich llofnod cyfreithiol. Mae hyn yr un mor ddiogel a rhwymol mewn cyfraith â llofnodi’ch LPA â llaw.

", @@ -461,12 +461,16 @@ "backToDashboard": "Yn ôl i’r dangosfwrdd", "myLpa": "Fy LPA {{ .LpaType }}", "yourLegalRightsAndResponsibilities": "Eich hawliau a’ch cyfrifoldebau cyfreithiol", - "yourLegalRightsAndResponsibilitiesContent:property-and-affairs": "

Cyn llofnodi, rhaid i chi ddarllen eich hawliau a’ch cyfrifoldebau cyfreithiol eto.

Sut dylai eich atwrneiod weithredu

Drwy lofnodi eich LPA, rydych yn penodi eich atwrneiod i wneud penderfyniadau ar eich rhan.

Rhaid i’ch atwrneiod ddilyn Deddf Galluedd Meddyliol 2005, rheoliadau a wneir oddi tani a’r Cod Ymarfer. Mae hyn yn cynnwys egwyddorion y Ddeddf Galluedd Meddyliol:

  • rhaid iddynt dybio eich bod yn gallu gwneud eich penderfyniadau eich hun, oni bai y sefydlir na allwch wneud hynny
  • rhaid iddynt eich helpu i wneud cynifer o’ch penderfyniadau eich hun ag y gallwch
  • rhaid iddynt gymryd bob cam rhesymol i’ch helpu i wneud penderfyniad. Dim ond os nad ydynt wedi llwyddo i’ch helpu i wneud penderfyniad drwy’r camau hynny y gallant eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad
  • ni ddylent eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad oherwydd eich bod yn gwneud penderfyniad annoeth
  • pan na allwch wneud penderfyniad, rhaid iddynt weithredu a gwneud penderfyniadau er eich lles pennaf
  • cyn iddynt wneud penderfyniad neu weithredu ar eich rhan, rhaid iddynt ystyried unrhyw opsiwn sy’n cyfyngu llai ar eich hawliau a’ch rhyddid a allai arwain at yr un canlyniad

Sut gall eich LPA gael ei defnyddio

  • pan fyddwch yn llofnodi eich LPA, rydych chi’n creu gweithred. Mae’n ddogfen gyfreithiol sy’n rhoi pwerau penodol i’ch atwrneiod
  • dim ond pan fydd wedi’i chofrestru gyda Swyddfa’r Gwarcheidwad Cyhoeddus y gall eich LPA gael ei defnyddio
  • gallwch ganslo eich LPA unrhyw bryd os oes gennych alluedd meddyliol. Darllenwch fwy am sut i ganslo eich LPA
  • ni all eich atwrneiod ddefnyddio eich LPA i wneud newidiadau i’ch ewyllys
  • bydd eich LPA yn dod i ben pan fyddwch yn marw
", + "beforeSigningYouMustReadAgain": "Cyn llofnodi, rhaid i chi ddarllen eich hawliau a’ch cyfrifoldebau cyfreithiol eto.", + "yourLegalRightsAndResponsibilitiesContent:property-and-affairs": "

Sut dylai eich atwrneiod weithredu

Drwy lofnodi eich LPA, rydych yn penodi eich atwrneiod i wneud penderfyniadau ar eich rhan.

Rhaid i’ch atwrneiod ddilyn Deddf Galluedd Meddyliol 2005, rheoliadau a wneir oddi tani a’r Cod Ymarfer. Mae hyn yn cynnwys egwyddorion y Ddeddf Galluedd Meddyliol:

  • rhaid iddynt dybio eich bod yn gallu gwneud eich penderfyniadau eich hun, oni bai y sefydlir na allwch wneud hynny
  • rhaid iddynt eich helpu i wneud cynifer o’ch penderfyniadau eich hun ag y gallwch
  • rhaid iddynt gymryd bob cam rhesymol i’ch helpu i wneud penderfyniad. Dim ond os nad ydynt wedi llwyddo i’ch helpu i wneud penderfyniad drwy’r camau hynny y gallant eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad
  • ni ddylent eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad oherwydd eich bod yn gwneud penderfyniad annoeth
  • pan na allwch wneud penderfyniad, rhaid iddynt weithredu a gwneud penderfyniadau er eich lles pennaf
  • cyn iddynt wneud penderfyniad neu weithredu ar eich rhan, rhaid iddynt ystyried unrhyw opsiwn sy’n cyfyngu llai ar eich hawliau a’ch rhyddid a allai arwain at yr un canlyniad

Sut gall eich LPA gael ei defnyddio

  • pan fyddwch yn llofnodi eich LPA, rydych chi’n creu gweithred. Mae’n ddogfen gyfreithiol sy’n rhoi pwerau penodol i’ch atwrneiod
  • dim ond pan fydd wedi’i chofrestru gyda Swyddfa’r Gwarcheidwad Cyhoeddus y gall eich LPA gael ei defnyddio
  • gallwch ganslo eich LPA unrhyw bryd os oes gennych alluedd meddyliol. Darllenwch fwy am sut i ganslo eich LPA
  • ni all eich atwrneiod ddefnyddio eich LPA i wneud newidiadau i’ch ewyllys
  • bydd eich LPA yn dod i ben pan fyddwch yn marw
", + "yourLegalRightsAndResponsibilitiesContent:property-and-affairs:h3": "

Sut dylai eich atwrneiod weithredu

Drwy lofnodi eich LPA, rydych yn penodi eich atwrneiod i wneud penderfyniadau ar eich rhan.

Rhaid i’ch atwrneiod ddilyn Deddf Galluedd Meddyliol 2005, rheoliadau a wneir oddi tani a’r Cod Ymarfer. Mae hyn yn cynnwys egwyddorion y Ddeddf Galluedd Meddyliol:

  • rhaid iddynt dybio eich bod yn gallu gwneud eich penderfyniadau eich hun, oni bai y sefydlir na allwch wneud hynny
  • rhaid iddynt eich helpu i wneud cynifer o’ch penderfyniadau eich hun ag y gallwch
  • rhaid iddynt gymryd bob cam rhesymol i’ch helpu i wneud penderfyniad. Dim ond os nad ydynt wedi llwyddo i’ch helpu i wneud penderfyniad drwy’r camau hynny y gallant eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad
  • ni ddylent eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad oherwydd eich bod yn gwneud penderfyniad annoeth
  • pan na allwch wneud penderfyniad, rhaid iddynt weithredu a gwneud penderfyniadau er eich lles pennaf
  • cyn iddynt wneud penderfyniad neu weithredu ar eich rhan, rhaid iddynt ystyried unrhyw opsiwn sy’n cyfyngu llai ar eich hawliau a’ch rhyddid a allai arwain at yr un canlyniad

Sut gall eich LPA gael ei defnyddio

  • pan fyddwch yn llofnodi eich LPA, rydych chi’n creu gweithred. Mae’n ddogfen gyfreithiol sy’n rhoi pwerau penodol i’ch atwrneiod
  • dim ond pan fydd wedi’i chofrestru gyda Swyddfa’r Gwarcheidwad Cyhoeddus y gall eich LPA gael ei defnyddio
  • gallwch ganslo eich LPA unrhyw bryd os oes gennych alluedd meddyliol. Darllenwch fwy am sut i ganslo eich LPA
  • ni all eich atwrneiod ddefnyddio eich LPA i wneud newidiadau i’ch ewyllys
  • bydd eich LPA yn dod i ben pan fyddwch yn marw
", "yourLegalRightsAndResponsibilitiesContent:personal-welfare": "

Welsh

", + "yourLegalRightsAndResponsibilitiesContent:personal-welfare:h3": "

Welsh

", "whatHappensNextContent": "

Dylech fod wedi cwrdd a siarad â’r rhoddwr, {{ .DonorFullName }}.

Dylech fod wedi dod i’r farn:

  • eu bod yn deall yr LPA maent yn ei gwneud a beth mae’n ei olygu
  • nad oes pwysau’n cael ei roi arnynt gan rywun arall i wneud yr LPA hon
  • nad oes twyll yn gysylltiedig â gwneud yr LPA
  • nad oes rheswm arall dros bryderu

Mae’n bosibl y byddwch wedi gwneud nodiadau yn ystod eich sgwrs. Os bydd gennym unrhyw bryderon o gwbl, gallem ofyn i chi ddweud rhagor wrthym am y sgwrs a gawsoch â {{ .DonorFirstNames }}.

Penderfynu a ydych am ddarparu’ch tystysgrif

Rhaid i chi benderfynu nawr a ydych am ddarparu’r dystysgrif ar gyfer yr LPA hon.

Os ydych yn barod ac nad oes gennych unrhyw bryderon, gallwch ddarparu’ch tystysgrif drwy ei llofnodi ar-lein. Gallwch wneud hyn ar y dudalen nesaf.

Welsh {{ .DonorFirstNames }} Welsh

Welsh

", "provideYourCertificate": "Darparu eich tystysgrif", "provideTheCertificateForThisLpa": "Darparu’r dystysgrif ar gyfer yr LPA hon", - "provideTheCertificateForThisLpaContent": "

Eich datganiad fel y darparwr tystysgrif

Rwyf yn cadarnhau:

  • fy mod yn 18 oed neu’n hŷn
  • fy mod wedi darllen yr LPA hon
  • nad wyf yn gweithredu fel atwrnai neu atwrnai wrth gefn ar gyfer yr LPA hon
  • nad oes dim sy’n fy rhwystro rhag gweithredu fel y darparwr tystysgrif ar gyfer yr LPA hon
  • fy mod un ai wedi adnabod y rhoddwr yn bersonol am o leiaf 2 flynedd neu fy mod yn rhywun sydd â’r sgiliau proffesiynol perthnasol i ddarparu’r dystysgrif ar gyfer yr LPA hon
  • gall y wybodaeth a ddarparwyd gennyf gael ei defnyddio gan Swyddfa’r Gwarcheidwad Cyhoeddus wrth gyflawni ei dyletswyddau

Rwyf yn ardystio bod y canlynol yn wir, yn fy marn i, ar adeg llofnodi:

  • bod y rhoddwr wedi deall pwrpas yr LPA hon a’r pŵer y mae’n ei roi i’w atwrneiod. Mae hyn yn golygu eu bod wedi gallu deall a chofio’r wybodaeth, ei defnyddio i wneud penderfyniad, er enghraifft drwy bwyso a mesur pa wybodaeth oedd bwysicaf, a’i chyfleu
  • nad yw twyll na phwysau amhriodol yn dylanwadu ar y rhoddwr i greu’r LPA hon
  • nad oes dim arall a fyddai’n atal yr LPA hon rhag cael ei chreu
", + "yourStatementAsCertificateProvider": "Eich datganiad fel y darparwr tystysgrif", + "provideTheCertificateForThisLpaContent": "

Rwyf yn cadarnhau:

  • fy mod yn 18 oed neu’n hŷn
  • fy mod wedi darllen yr LPA hon
  • nad wyf yn gweithredu fel atwrnai neu atwrnai wrth gefn ar gyfer yr LPA hon
  • nad oes dim sy’n fy rhwystro rhag gweithredu fel y darparwr tystysgrif ar gyfer yr LPA hon
  • fy mod un ai wedi adnabod y rhoddwr yn bersonol am o leiaf 2 flynedd neu fy mod yn rhywun sydd â’r sgiliau proffesiynol perthnasol i ddarparu’r dystysgrif ar gyfer yr LPA hon
  • gall y wybodaeth a ddarparwyd gennyf gael ei defnyddio gan Swyddfa’r Gwarcheidwad Cyhoeddus wrth gyflawni ei dyletswyddau

Rwyf yn ardystio bod y canlynol yn wir, yn fy marn i, ar adeg llofnodi:

  • bod y rhoddwr wedi deall pwrpas yr LPA hon a’r pŵer y mae’n ei roi i’w atwrneiod. Mae hyn yn golygu eu bod wedi gallu deall a chofio’r wybodaeth, ei defnyddio i wneud penderfyniad, er enghraifft drwy bwyso a mesur pa wybodaeth oedd bwysicaf, a’i chyfleu
  • nad yw twyll na phwysau amhriodol yn dylanwadu ar y rhoddwr i greu’r LPA hon
  • nad oes dim arall a fyddai’n atal yr LPA hon rhag cael ei chreu
", "yourSignature": "Eich llofnod", "iAgreeToTheseStatements": "Yr wyf i, {{.FullName}}, yn cytuno bod y datganiadau hyn yn wir ac yn deall bod ticio’r blwch hwn yn gweithredu fel fy llofnod cyfreithiol.", "whenYouTickTheBoxToConfirmAndSign": "Wrth dicio’r blwch i gadarnhau a llofnodi, rydych yn darparu’r dystysgrif ar gyfer yr LPA hon.", @@ -1380,5 +1384,21 @@ "yourVouchedForIdentityHasExpired": "

Welsh

Welsh

", "yourVouchedForIdentityHasExpiredSecondAttempt": "

Welsh

Welsh

Welsh

", "anEmail": "Welsh", - "aTextMessage": "Welsh" + "aTextMessage": "Welsh", + "iConfirmThat": "Welsh", + "donorSignature": "Welsh", + "signedByOn": "Welsh {{.FullName}}", + "witnessedByOn": "Welsh {{.FullName}}", + "certificateProviderSignature": "Welsh", + "attorneySignature": "Welsh", + "iUnderstandAndConfirmThat": "Welsh", + "asReplacementTrustCorporationAlsoConfirmThat": "

Welsh {{.Name}}

", + "replacementAttorneySignature": "Welsh", + "typeLpa": "Welsh {{.Type}}", + "signatures": "Welsh", + "signedOnBehalfByOn": "Welsh {{.FullName}} {{.SignatoryFullName}}", + "witnessingOfDonorSignature": "Welsh", + "iConfirmTheLpaWasSignedInMyPresence": "Welsh", + "trustCorporationSignature": "Welsh", + "replacementTrustCorporationSignature": "Welsh" } diff --git a/lang/en.json b/lang/en.json index 2cc4e90d15..8af8e55cb7 100644 --- a/lang/en.json +++ b/lang/en.json @@ -287,7 +287,7 @@ "iHaveNotChosenToNotifyAnyone": "I have chosen not to notify anyone about my LPA", "infoIProvidedCanBeUsedByOpg": "the information I’ve provided can be used by the Office of the Public Guardian when carrying out its duties", "whenYouTickAndClick": "When you tick these boxes and select ‘Submit my signature’ you are legally signing your LPA and delivering it as a deed.", - "iConfirmThat": "I, {{ .DonorFullName }}, confirm that:", + "iNameConfirmThat": "I, {{ .DonorFullName }}, confirm that:", "wantToApply": "I want to apply to register this LPA", "howTickingActsAsSignature": "How ticking the boxes acts as your legal signature", "howTickingActsAsSignatureContent": "

Electronic signatures are legally recognised in England and Wales. They make it easier for you to sign documents online.

By ticking both boxes and selecting ‘Submit my signature’, you are providing your legal signature. This is just as safe and legally binding as signing your LPA by hand.

", @@ -423,12 +423,16 @@ "backToDashboard": "Back to dashboard", "myLpa": "My {{ .LpaType }} lasting power of attorney", "yourLegalRightsAndResponsibilities": "Your legal rights and responsibilities", - "yourLegalRightsAndResponsibilitiesContent:property-and-affairs": "

Before signing, you must read your legal rights and responsibilities again.

How your attorneys should act

By signing your LPA, you are appointing your attorneys to make decisions for you.

Your attorneys must follow the Mental Capacity Act 2005 (MCA) and the Code of Practice. This includes the principles of the MCA:

  • they must assume you can make your own decisions, unless it is established that you cannot do so
  • they must help you to make as many of your own decisions as you can
  • they must take all practical steps to help you make a decision. They must only treat you as unable to make a decision if they have not succeeded in helping you make a decision through those steps
  • they must not treat you as unable to make a decision because you have made an unwise decision
  • they must act and make decisions in your best interests when you are unable to make a decision
  • before they make a decision or act for you, they must consider any option that is less restrictive of your rights and freedoms which might achieve the same outcome

How your LPA can be used

  • when you sign your LPA, you are making a deed. This is a legal document which officially gives certain powers to your attorneys
  • your LPA can only be used once it is registered with the Office of the Public Guardian (OPG)
  • you can cancel your LPA at any time if you have mental capacity. Find out more about how to cancel your LPA
  • your attorneys cannot use your LPA to make changes to your will
  • your LPA will expire when you die
", - "yourLegalRightsAndResponsibilitiesContent:personal-welfare": "

Before signing, you must read your legal rights and responsibilities again.

How your attorneys should act

By signing your LPA, you are appointing your attorneys to make decisions for you.

Your attorneys must follow the Mental Capacity Act 2005 (MCA) and the Code of Practice. This includes the principles of the MCA:

  • they must assume you can make your own decisions, unless it is established that you cannot do so
  • they must help you to make as many of your own decisions as you can
  • they must take all practical steps to help you make a decision. They must only treat you as unable to make a decision if they have not succeeded in helping you make a decision through those steps
  • they must not treat you as unable to make a decision because you have made an unwise decision
  • they must act and make decisions in your best interests when you are unable to make a decision
  • before they make a decision or act for you, they must consider any option that is less restrictive of your rights and freedoms which might achieve the same outcome

How your LPA can be used

  • when you sign your LPA, you are making a deed. This is a legal document which grants certain powers to your attorneys
  • your LPA can only be used once it is registered with the Office of the Public Guardian (OPG)
  • you can cancel your LPA at any time if you have mental capacity. Find out more about how to cancel your LPA
  • your attorneys cannot use your LPA to make changes to your will
  • your LPA will expire when you die
", + "beforeSigningYouMustReadAgain": "Before signing, you must read your legal rights and responsibilities again.", + "yourLegalRightsAndResponsibilitiesContent:property-and-affairs": "

How your attorneys should act

By signing your LPA, you are appointing your attorneys to make decisions for you.

Your attorneys must follow the Mental Capacity Act 2005 (MCA) and the Code of Practice. This includes the principles of the MCA:

  • they must assume you can make your own decisions, unless it is established that you cannot do so
  • they must help you to make as many of your own decisions as you can
  • they must take all practical steps to help you make a decision. They must only treat you as unable to make a decision if they have not succeeded in helping you make a decision through those steps
  • they must not treat you as unable to make a decision because you have made an unwise decision
  • they must act and make decisions in your best interests when you are unable to make a decision
  • before they make a decision or act for you, they must consider any option that is less restrictive of your rights and freedoms which might achieve the same outcome

How your LPA can be used

  • when you sign your LPA, you are making a deed. This is a legal document which officially gives certain powers to your attorneys
  • your LPA can only be used once it is registered with the Office of the Public Guardian (OPG)
  • you can cancel your LPA at any time if you have mental capacity. Find out more about how to cancel your LPA
  • your attorneys cannot use your LPA to make changes to your will
  • your LPA will expire when you die
", + "yourLegalRightsAndResponsibilitiesContent:personal-welfare": "

How your attorneys should act

By signing your LPA, you are appointing your attorneys to make decisions for you.

Your attorneys must follow the Mental Capacity Act 2005 (MCA) and the Code of Practice. This includes the principles of the MCA:

  • they must assume you can make your own decisions, unless it is established that you cannot do so
  • they must help you to make as many of your own decisions as you can
  • they must take all practical steps to help you make a decision. They must only treat you as unable to make a decision if they have not succeeded in helping you make a decision through those steps
  • they must not treat you as unable to make a decision because you have made an unwise decision
  • they must act and make decisions in your best interests when you are unable to make a decision
  • before they make a decision or act for you, they must consider any option that is less restrictive of your rights and freedoms which might achieve the same outcome

How your LPA can be used

  • when you sign your LPA, you are making a deed. This is a legal document which grants certain powers to your attorneys
  • your LPA can only be used once it is registered with the Office of the Public Guardian (OPG)
  • you can cancel your LPA at any time if you have mental capacity. Find out more about how to cancel your LPA
  • your attorneys cannot use your LPA to make changes to your will
  • your LPA will expire when you die
", + "yourLegalRightsAndResponsibilitiesContent:property-and-affairs:h3": "

How your attorneys should act

By signing your LPA, you are appointing your attorneys to make decisions for you.

Your attorneys must follow the Mental Capacity Act 2005 (MCA) and the Code of Practice. This includes the principles of the MCA:

  • they must assume you can make your own decisions, unless it is established that you cannot do so
  • they must help you to make as many of your own decisions as you can
  • they must take all practical steps to help you make a decision. They must only treat you as unable to make a decision if they have not succeeded in helping you make a decision through those steps
  • they must not treat you as unable to make a decision because you have made an unwise decision
  • they must act and make decisions in your best interests when you are unable to make a decision
  • before they make a decision or act for you, they must consider any option that is less restrictive of your rights and freedoms which might achieve the same outcome

How your LPA can be used

  • when you sign your LPA, you are making a deed. This is a legal document which officially gives certain powers to your attorneys
  • your LPA can only be used once it is registered with the Office of the Public Guardian (OPG)
  • you can cancel your LPA at any time if you have mental capacity. Find out more about how to cancel your LPA
  • your attorneys cannot use your LPA to make changes to your will
  • your LPA will expire when you die
", + "yourLegalRightsAndResponsibilitiesContent:personal-welfare:h3": "

How your attorneys should act

By signing your LPA, you are appointing your attorneys to make decisions for you.

Your attorneys must follow the Mental Capacity Act 2005 (MCA) and the Code of Practice. This includes the principles of the MCA:

  • they must assume you can make your own decisions, unless it is established that you cannot do so
  • they must help you to make as many of your own decisions as you can
  • they must take all practical steps to help you make a decision. They must only treat you as unable to make a decision if they have not succeeded in helping you make a decision through those steps
  • they must not treat you as unable to make a decision because you have made an unwise decision
  • they must act and make decisions in your best interests when you are unable to make a decision
  • before they make a decision or act for you, they must consider any option that is less restrictive of your rights and freedoms which might achieve the same outcome

How your LPA can be used

  • when you sign your LPA, you are making a deed. This is a legal document which grants certain powers to your attorneys
  • your LPA can only be used once it is registered with the Office of the Public Guardian (OPG)
  • you can cancel your LPA at any time if you have mental capacity. Find out more about how to cancel your LPA
  • your attorneys cannot use your LPA to make changes to your will
  • your LPA will expire when you die
", "whatHappensNextContent": "

You should have met and talked with the donor, {{ .DonorFullName }}.

You should now be of the opinion that:

  • they understand the LPA they’re making and what it means
  • they are not being pressured to make this LPA by someone else
  • there is no fraud involved in the making of the LPA
  • there is no other reason for concern

You may have taken some notes about your conversation. If we ever have any concerns, we may ask you to tell us more about the conversation you had with {{ .DonorFirstNames }}.

Decide if you want to provide your certificate

You must now decide if you want to provide the certificate for this LPA.

If you are ready and have no concerns, you can provide your certificate by signing online. You can do this on the next page.

If you have decided not to provide the certificate on this LPA, you should speak to {{ .DonorFirstNames }} about your decision.

You can confirm that you do not want to provide the certificate when you continue to the signing page.

", "provideYourCertificate": "Provide your certificate", "provideTheCertificateForThisLpa": "Provide the certificate for this LPA", - "provideTheCertificateForThisLpaContent": "

Your statement as the certificate provider

I confirm that:

  • I’m aged 18 or over
  • I have read this LPA
  • I am not acting as an attorney or a replacement attorney on this LPA
  • there is nothing that stops me from acting as the certificate provider on this LPA
  • I have either known the donor personally for at least 2 years or I am someone with the relevant professional skills and expertise to provide the certificate for this LPA
  • the information I’ve provided can be used by the Office of the Public Guardian when carrying out its duties

I certify that, in my opinion, at the time of signing:

  • the donor understood the purpose of this LPA and the power it gives their attorneys. This means they were able to understand and remember this information, use it to make a decision, for example by weighing up what information was most important, and communicate it
  • no fraud or undue pressure is influencing the donor to create this LPA
  • there is nothing else which would prevent this LPA from being created
", + "yourStatementAsCertificateProvider": "Your statement as the certificate provider", + "provideTheCertificateForThisLpaContent": "

I confirm that:

  • I’m aged 18 or over
  • I have read this LPA
  • I am not acting as an attorney or a replacement attorney on this LPA
  • there is nothing that stops me from acting as the certificate provider on this LPA
  • I have either known the donor personally for at least 2 years or I am someone with the relevant professional skills and expertise to provide the certificate for this LPA
  • the information I’ve provided can be used by the Office of the Public Guardian when carrying out its duties

I certify that, in my opinion, at the time of signing:

  • the donor understood the purpose of this LPA and the power it gives their attorneys. This means they were able to understand and remember this information, use it to make a decision, for example by weighing up what information was most important, and communicate it
  • no fraud or undue pressure is influencing the donor to create this LPA
  • there is nothing else which would prevent this LPA from being created
", "yourSignature": "Your signature", "iAgreeToTheseStatements": "I, {{.FullName}}, agree these statements are true and understand that ticking this box acts as my legal signature.", "whenYouTickTheBoxToConfirmAndSign": "When you tick the box to confirm and sign, you are providing the certificate for this LPA.", @@ -1309,5 +1313,21 @@ "yourVouchedForIdentityHasExpired": "

Your vouched-for identity has expired

You must sign your LPA within 6 months of having your identity vouched for.

", "yourVouchedForIdentityHasExpiredSecondAttempt": "

Your vouched-for identity has expired

You must sign your LPA within 6 months of having your identity vouched for.

You cannot ask another person to vouch for you as only 2 attempts can be made of having someone vouch for your identity.

", "anEmail": "an email", - "aTextMessage": "a text message" + "aTextMessage": "a text message", + "iConfirmThat": "I confirm that:", + "donorSignature": "Donor signature", + "signedByOn": "Signed by {{.FullName}} on:", + "witnessedByOn": "Witnessed by {{.FullName}} on:", + "certificateProviderSignature": "Certificate provider signature", + "attorneySignature": "Attorney signature", + "iUnderstandAndConfirmThat": "I understand and confirm that:", + "asReplacementTrustCorporationAlsoConfirmThat": "

I also confirm that I understand:

{{.Name}} only has the authority to act under this LPA after an original attorney’s appointment is terminated. The company must notify the Public Guardian if this happens.

", + "replacementAttorneySignature": "Replacement attorney signature", + "typeLpa": "{{.Type}} LPA", + "signatures": "Signatures", + "signedOnBehalfByOn": "Signed on behalf of {{.FullName}} by {{.SignatoryFullName}} on:", + "witnessingOfDonorSignature": "Witnessing of donor signature", + "iConfirmTheLpaWasSignedInMyPresence": "I confirm that the LPA was signed in my presence and that my name and address are correct.", + "trustCorporationSignature": "Trust corporation signature", + "replacementTrustCorporationSignature": "Replacement trust corporation signature" } diff --git a/web/assets/main.js b/web/assets/main.js index 9a0bb05550..705b02134e 100644 --- a/web/assets/main.js +++ b/web/assets/main.js @@ -24,15 +24,14 @@ function init() { new CrossServiceHeader(header).init(); } - const buttonMenu = document.querySelector(".moj-button-menu"); - if (buttonMenu) { + document.querySelectorAll(".moj-button-menu").forEach(buttonMenu => { new MOJFrontend.ButtonMenu({ container: buttonMenu, mq: "(max-width: 1px)", buttonText: "Actions", buttonClasses: "govuk-button--secondary moj-button-menu__toggle-button--secondary", - }); - } + }) + }) new DataLossWarning(document.getElementById('return-to-tasklist-btn'), document.getElementById('dialog')).init() new DataLossWarning(document.querySelector('.trans-switch a'), document.getElementById('language-dialog')).init() diff --git a/web/assets/scss/main.scss b/web/assets/scss/main.scss index afdad159d9..bc8eb28d6a 100644 --- a/web/assets/scss/main.scss +++ b/web/assets/scss/main.scss @@ -172,3 +172,14 @@ body.js-enabled .js-only { .app-unbold { font-weight: normal !important; } + +.app-signing-list { + border-top: 1px solid $govuk-border-colour; +} +.app-signing-list .govuk-summary-list__key { + font-weight: normal; + width: 66%; +} +.app-signing-list .govuk-summary-list__value { + text-align: right; +} diff --git a/web/template/attorney/sign.gohtml b/web/template/attorney/sign.gohtml index 333214abcb..7504e3e13b 100644 --- a/web/template/attorney/sign.gohtml +++ b/web/template/attorney/sign.gohtml @@ -71,8 +71,12 @@ - {{ if and (not .App.IsTrustCorporation) .IsReplacement }} - {{ trHtml .App "asReplacementAttorneyAlsoConfirmThat" }} + {{ if .IsReplacement }} + {{ if .App.IsTrustCorporation }} + {{ trFormatHtml .App "asReplacementTrustCorporationAlsoConfirmThat" "Name" .TrustCorporation.Name }} + {{ else }} + {{ trHtml .App "asReplacementAttorneyAlsoConfirmThat" }} + {{ end }} {{ end }}
diff --git a/web/template/certificateprovider/provide_certificate.gohtml b/web/template/certificateprovider/provide_certificate.gohtml index 6ff6efd856..e96f876bf6 100644 --- a/web/template/certificateprovider/provide_certificate.gohtml +++ b/web/template/certificateprovider/provide_certificate.gohtml @@ -7,6 +7,8 @@

{{ tr .App "provideTheCertificateForThisLpa" }}

+

{{ tr .App "yourStatementAsCertificateProvider" }}

+ {{ trHtml .App "provideTheCertificateForThisLpaContent" }}
diff --git a/web/template/dashboard.gohtml b/web/template/dashboard.gohtml index 973e5913ac..7d2881ad9d 100644 --- a/web/template/dashboard.gohtml +++ b/web/template/dashboard.gohtml @@ -41,21 +41,21 @@
{{ if not .Item.Lpa.WithdrawnAt.IsZero }} {{ else if .Item.Lpa.CannotRegister }} {{ else if not .Item.Lpa.RegisteredAt.IsZero }}

- {{ tr .App "viewLpa" }}
+ {{ tr .App "viewLpa" }}
{{ tr .App "useThisLpa" }}

{{ else if .Item.Lpa.Submitted }} @@ -64,7 +64,7 @@ {{ tr .App "goToTaskList" }} diff --git a/web/template/donor/read_your_lpa.gohtml b/web/template/donor/read_your_lpa.gohtml index 2976c8ba19..656c58c1c8 100644 --- a/web/template/donor/read_your_lpa.gohtml +++ b/web/template/donor/read_your_lpa.gohtml @@ -9,7 +9,7 @@ {{ template "warning" (content .App "readAndCheckYourLpa") }} - {{ template "contextual-lpa" . }} + {{ template "changeable-contextual-lpa" . }} {{ template "buttons" (button .App "continue" "link" (global.Paths.YourLpaLanguage.Format .App.LpaID)) }}
diff --git a/web/template/donor/sign_your_lpa.gohtml b/web/template/donor/sign_your_lpa.gohtml index 3af785006b..37907b7ce2 100644 --- a/web/template/donor/sign_your_lpa.gohtml +++ b/web/template/donor/sign_your_lpa.gohtml @@ -50,7 +50,7 @@

- {{ trFormat .App "iConfirmThat" "DonorFullName" .Donor.Donor.FullName }} + {{ trFormat .App "iNameConfirmThat" "DonorFullName" .Donor.Donor.FullName }}

diff --git a/web/template/donor/view_lpa.gohtml b/web/template/donor/view_lpa.gohtml new file mode 100644 index 0000000000..ce7915476f --- /dev/null +++ b/web/template/donor/view_lpa.gohtml @@ -0,0 +1,13 @@ +{{ template "page" . }} + +{{ define "pageTitle" }}{{ trFormat .App "typeLpa" "Type" (tr .App .Lpa.Type.String) }}{{ end }} + +{{ define "main" }} +
+
+

{{ template "pageTitle" . }}

+ + {{ template "contextual-lpa" . }} +
+
+{{ end }} diff --git a/web/template/donor/your_legal_rights_and_responsibilities.gohtml b/web/template/donor/your_legal_rights_and_responsibilities.gohtml index 6de87be5b2..8e9b6e663c 100644 --- a/web/template/donor/your_legal_rights_and_responsibilities.gohtml +++ b/web/template/donor/your_legal_rights_and_responsibilities.gohtml @@ -7,6 +7,8 @@

{{ tr .App "yourLegalRightsAndResponsibilities" }}

+

{{ tr .App "beforeSigningYouMustReadAgain" }}

+ {{ trHtml .App (printf "yourLegalRightsAndResponsibilitiesContent:%s" .Donor.Type.String) }}

diff --git a/web/template/layout/address-summary-row.gohtml b/web/template/layout/address-summary-row.gohtml index 0d592605e0..443f31d97f 100644 --- a/web/template/layout/address-summary-row.gohtml +++ b/web/template/layout/address-summary-row.gohtml @@ -1,5 +1,5 @@ {{ define "address-summary-row" }} -

+
{{ tr .App .Label }}
{{ if .Value.Line1 }} diff --git a/web/template/layout/changeable-contextual-lpa.gohtml b/web/template/layout/changeable-contextual-lpa.gohtml new file mode 100644 index 0000000000..1371f98ea2 --- /dev/null +++ b/web/template/layout/changeable-contextual-lpa.gohtml @@ -0,0 +1,490 @@ +{{ define "changeable-contextual-lpa" }} + {{ $donorFullName := .Donor.Donor.FullName }} + {{ $isPropertyAndAffairs := .Donor.Type.IsPropertyAndAffairs }} + {{ $isDonor := .App.IsDonor }} + {{ $canChange := and $isDonor (not .Donor.Tasks.ConfirmYourIdentityAndSign.IsCompleted) }} + + {{ template "contextual-lpa-warning" . }} + + {{ with .Donor.Donor }} +
+
+

{{ tr $.App "donor" }}: {{ .FullName }}

+
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLink $.App global.Paths.YourName "#f-first-names") + .FullName $canChange $isDonor) }} + + {{ template "optional-summary-row" (summaryRow $.App "otherNamesYouAreKnownBy" + .OtherNames + (fromLink $.App global.Paths.YourName "#f-other-names") + .FullName $canChange $isDonor) }} + + {{ template "summary-row" (summaryRow $.App "dateOfBirth" + (formatDate $.App .DateOfBirth) + (fromLink $.App global.Paths.YourDateOfBirth "#f-date-of-birth") + .FullName $canChange $isDonor) }} + + {{ template "summary-row" (summaryRow $.App "email" + .Email + "" + .FullName false $isDonor) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLink $.App global.Paths.YourAddress "#f-address-line-1") + .FullName $canChange $isDonor) }} + + {{ if $isDonor }} + {{ template "summary-row" (summaryRow $.App "preferredContactLanguage" + (tr $.App .ContactLanguagePreference.String) + (fromLink $.App global.Paths.YourPreferredLanguage "") + .FullName $canChange $isDonor) }} + {{ end }} +
+
+
+ {{ end }} + + {{ with .Donor.CertificateProvider }} +
+
+

{{ tr $.App "certificateProvider" }}: {{ .FullName }}

+
+
+
+ {{ $contactValue := "" }} + {{ if .CarryOutBy.IsPaper }} + {{ $contactValue = tr $.App "usingPaperForms" }} + {{ else if .CarryOutBy.IsOnline }} + {{ $contactValue = tr $.App "byEmail" }} + {{ end }} + + {{ $addressLabel := tr $.App "address" }} + {{ if .Relationship.IsProfessionally }} + {{ $addressLabel = tr $.App "workAddress" }} + {{ end }} + + {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLink $.App global.Paths.CertificateProviderDetails "#f-first-names") + .FullName $canChange false ) }} + + {{ template "summary-row" (summaryRow $.App "mobile" + (formatPhone .Mobile) + (fromLink $.App global.Paths.CertificateProviderDetails "#f-mobile") + .FullName $canChange false ) }} + + {{ template "summary-row" (summaryRow $.App "contactPreference" + $contactValue + (fromLink $.App global.Paths.HowWouldCertificateProviderPreferToCarryOutTheirRole "") + .FullName $canChange false ) }} + + {{ template "optional-summary-row" (summaryRow $.App "email" + .Email + (fromLink $.App global.Paths.HowWouldCertificateProviderPreferToCarryOutTheirRole "#f-email") + .FullName $canChange false ) }} + + {{ template "address-summary-row" (summaryRow $.App $addressLabel + .Address + (fromLink $.App global.Paths.CertificateProviderAddress "#f-address-line-1") + .FullName $canChange false ) }} +
+
+
+ {{ end }} + + {{ range .Donor.Attorneys.Attorneys }} +
+
+

{{ tr $.App "attorney" }}: {{ .FullName }}

+ + {{ if $canChange }} + + {{ end }} +
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLinkActor $.App global.Paths.ChooseAttorneys .UID "#f-first-names") + .FullName $canChange false) }} + + {{ template "summary-row" (summaryRow $.App "dateOfBirth" + (formatDate $.App .DateOfBirth) + (fromLinkActor $.App global.Paths.ChooseAttorneys .UID "#f-date-of-birth") + .FullName $canChange false) }} + + {{ template "optional-summary-row" (summaryRow $.App "email" + .Email + (fromLinkActor $.App global.Paths.ChooseAttorneys .UID "#f-email") + .FullName $canChange false) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLinkActor $.App global.Paths.ChooseAttorneysAddress .UID "#f-address-line-1") + .FullName $canChange false) }} +
+
+
+ {{ end }} + + {{ if .Donor.Attorneys.TrustCorporation.Name }} + {{ with .Donor.Attorneys.TrustCorporation }} +
+
+

{{ tr $.App "trustCorporationAttorney" }}: {{ .Name }}

+ + {{ if $canChange }} + + {{ end }} +
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .Name + (fromLink $.App global.Paths.EnterTrustCorporation "#f-name") + .Name $canChange false) }} + + {{ template "summary-row" (summaryRow $.App "companyNumber" + .CompanyNumber + (fromLink $.App global.Paths.EnterTrustCorporation "#f-company-number") + .Name $canChange false) }} + + {{ template "optional-summary-row" (summaryRow $.App "companyEmailAddress" + .Email + (fromLink $.App global.Paths.EnterTrustCorporation "#f-email") + .Name $canChange false) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLink $.App global.Paths.EnterTrustCorporationAddress "#f-address-line-1") + .Name $canChange false) }} +
+
+
+ {{ end }} + {{ end }} + + {{ range .Donor.ReplacementAttorneys.Attorneys }} +
+
+

{{ tr $.App "replacementAttorney" }}: {{ .FullName }}

+ + {{ if $canChange }} + + {{ end }} +
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLinkActor $.App global.Paths.ChooseReplacementAttorneys .UID "#f-first-names") + .FullName $canChange (eq $.App.AttorneyUID .UID)) }} + + {{ template "summary-row" (summaryRow $.App "dateOfBirth" + (formatDate $.App .DateOfBirth) + (fromLinkActor $.App global.Paths.ChooseReplacementAttorneys .UID "#f-date-of-birth") + .FullName $canChange false) }} + + {{ template "optional-summary-row" (summaryRow $.App "email" + .Email + (fromLinkActor $.App global.Paths.ChooseReplacementAttorneys .UID "#f-email") + .FullName $canChange false) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLinkActor $.App global.Paths.ChooseReplacementAttorneysAddress .UID "#f-address-line-1") + .FullName $canChange false) }} +
+
+
+ {{ end }} + + {{ if .Donor.ReplacementAttorneys.TrustCorporation.Name }} + {{ with .Donor.ReplacementAttorneys.TrustCorporation }} +
+
+

{{ tr $.App "replacementTrustCorporationAttorney" }}: {{ .Name }}

+ + {{ if $canChange }} + + {{ end }} +
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .Name + (fromLink $.App global.Paths.EnterReplacementTrustCorporation "#f-name") + .Name $canChange false) }} + + {{ template "summary-row" (summaryRow $.App "companyNumber" + .CompanyNumber + (fromLink $.App global.Paths.EnterReplacementTrustCorporation "#f-company-number") + .Name $canChange false) }} + + {{ template "optional-summary-row" (summaryRow $.App "companyEmailAddress" + .Email + (fromLink $.App global.Paths.EnterReplacementTrustCorporation "#f-email") + .Name $canChange false) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLink $.App global.Paths.EnterReplacementTrustCorporationAddress "#f-address-line-1") + .Name $canChange false) }} +
+
+
+ {{ end }} + {{ end }} + + {{ if .Donor.DoYouWantToNotifyPeople.IsYes }} + {{ range .Donor.PeopleToNotify }} +
+
+

{{ tr $.App "personToNotify" }}: {{ .FullName }}

+ + {{ if $canChange }} + + {{ end }} +
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLinkActor $.App global.Paths.ChoosePeopleToNotify .UID "#f-first-names") + .FullName $canChange false ) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLinkActor $.App global.Paths.ChoosePeopleToNotifyAddress .UID "#f-address-line-1") + .FullName $canChange false ) }} +
+
+
+ {{ end }} + {{ else }} + {{ $label := "theDonorHasChosenNotToFormallyNotifyAnyone" }} + {{ if $isDonor }} + {{ $label = "youHaveChosenNotToFormallyNotifyAnyone" }} + {{ end }} + +
+
+

{{ tr $.App "personToNotify" }}:

+
+
+

{{ tr .App $label }}

+
+
+ {{ end }} + + {{ if .Donor.AuthorisedSignatory.FirstNames }} + {{ with .Donor.AuthorisedSignatory }} +
+
+

{{ tr $.App "authorisedSignatory" }}: {{ .FullName }}

+
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLink $.App global.Paths.YourAuthorisedSignatory "#f-first-names") + .FullName $canChange false ) }} +
+
+
+ {{ end }} + {{ end }} + + {{ if .Donor.IndependentWitness.FirstNames }} + {{ with .Donor.IndependentWitness }} +
+
+

{{ tr $.App "independentWitness" }}: {{ .FullName }}

+
+
+
+ {{ template "summary-row" (summaryRow $.App "name" + .FullName + (fromLink $.App global.Paths.YourIndependentWitness "#f-first-names") + .FullName $canChange false ) }} + + {{ template "summary-row" (summaryRow $.App "mobile" + (formatPhone .Mobile) + (fromLink $.App global.Paths.YourIndependentWitnessMobile "#f-mobile") + .FullName $canChange false ) }} + + {{ template "address-summary-row" (summaryRow $.App "address" + .Address + (fromLink $.App global.Paths.YourIndependentWitnessAddress "#f-address-line-1") + .FullName $canChange false) }} +
+
+
+ {{ end }} + {{ end }} + + {{ template "contextual-lpa-warning" . }} + +

{{ tr .App "howLpaCanBeUsed" }}

+ +
+ {{ with .Donor.WhenCanTheLpaBeUsed }} + {{ $label := "whenAttorneysCanUseTheLpa" }} + {{ $value := printf "%s:3rd" .String }} + + {{ if $isDonor }} + {{ $label = "whenYourAttorneysCanUseYourLpa" }} + {{ $value = .String }} + {{ end }} + + {{ template "summary-row" (summaryRow $.App $label + (tr $.App $value) + (fromLink $.App global.Paths.WhenCanTheLpaBeUsed "") + $donorFullName (and $canChange $isPropertyAndAffairs) $isDonor) }} + {{ end }} + + {{ if .Donor.Type.IsPersonalWelfare }} + {{ $value := "optionB" }} + {{ if .Donor.LifeSustainingTreatmentOption.IsOptionA }} + {{ $value = "optionA" }} + {{ end }} + + {{ template "summary-row" (summaryRow .App "lifeSustainingTreatment" + (trHtml .App $value) + (fromLink .App global.Paths.LifeSustainingTreatment "") + $donorFullName $canChange $isDonor) }} + {{ end }} + + {{ if .Donor.AttorneyDecisions.How }} + {{ with .Donor.AttorneyDecisions.How }} + {{ $label := "howAttorneysMustMakeDecisions" }} + {{ $value := .String }} + + {{ if $isDonor }} + {{ $label = "howYourAttorneysMustMakeDecisions" }} + {{ $value = printf "your-%s" .String }} + {{ end }} + + {{ template "summary-row" (summaryRow $.App $label + (tr $.App $value) + (fromLink $.App global.Paths.HowShouldAttorneysMakeDecisions "") + $donorFullName $canChange $isDonor) }} + {{ end }} + {{ end }} + + {{ if .Donor.HowShouldReplacementAttorneysStepIn }} + {{ with .Donor.HowShouldReplacementAttorneysStepIn }} + {{ $label := "howReplacementAttorneysShouldStepIn" }} + {{ if $isDonor }} + {{ $label = "howYourReplacementAttorneysShouldStepIn" }} + {{ end }} + + {{ $value := "otherWay" }} + {{ if .IsWhenOneCanNoLongerAct }} + {{ $value = "whenOneCanNoLongerAct" }} + {{ else if .IsWhenAllCanNoLongerAct }} + {{ $value = "whenNoneCanNoLongerAct" }} + {{ end }} + + {{ template "summary-row" (summaryRow $.App $label + (trHtml $.App $value) + (fromLink $.App global.Paths.HowShouldReplacementAttorneysStepIn "") + $donorFullName $canChange $isDonor) }} + {{ end }} + {{ end }} + + {{ if .Donor.ReplacementAttorneyDecisions.How }} + {{ with .Donor.ReplacementAttorneyDecisions.How }} + {{ $label := "howReplacementAttorneysMustMakeDecisions" }} + {{ $value := .String }} + + {{ if $isDonor }} + {{ $label = "howYourReplacementAttorneysMustMakeDecisions" }} + {{ $value = printf "your-%s" .String }} + {{ end }} + + {{ template "summary-row" (summaryRow $.App $label + (tr $.App $value) + (fromLink $.App global.Paths.HowShouldReplacementAttorneysMakeDecisions "") + $donorFullName $canChange $isDonor) }} + {{ end }} + {{ end }} +
+ + {{ template "contextual-lpa-warning" . }} + +

{{ tr .App "restrictions" }}

+ +
+ {{ if .Donor.AttorneyDecisions.How.IsJointlyForSomeSeverallyForOthers }} + {{ $label := "decisionsAttorneysMustMakeJointly" }} + + {{ if $isDonor }} + {{ $label = "decisionsYourAttorneysMustMakeJointly" }} + {{ end }} + + {{ template "summary-row" (summaryRow .App $label + (trHtml .App .Donor.AttorneyDecisions.Details) + (fromLink $.App global.Paths.HowShouldAttorneysMakeDecisions "#f-mixed-details") + $donorFullName $canChange $isDonor) }} + {{ end }} + + {{ if .Donor.HowShouldReplacementAttorneysStepInDetails }} + {{ $label := "howReplacementAttorneysShouldStepIn" }} + + {{ if $isDonor }} + {{ $label = "howYourReplacementAttorneysShouldStepIn" }} + {{ end }} + + {{ template "summary-row" (summaryRow .App $label + .Donor.HowShouldReplacementAttorneysStepInDetails + (fromLink $.App global.Paths.HowShouldReplacementAttorneysStepIn "#f-other-details") + $donorFullName $canChange $isDonor) }} + {{ end }} + + {{ if .Donor.ReplacementAttorneyDecisions.How.IsJointlyForSomeSeverallyForOthers }} + {{ $label := "decisionsReplacementAttorneysMustMakeJointly" }} + + {{ if $isDonor }} + {{ $label = "decisionsYourReplacementAttorneysMustMakeJointly" }} + {{ end }} + + {{ template "summary-row" (summaryRow .App $label + (trHtml .App .Donor.ReplacementAttorneyDecisions.Details) + (fromLink $.App global.Paths.HowShouldReplacementAttorneysMakeDecisions "#f-mixed-details") + $donorFullName $canChange $isDonor) }} + {{ end }} + + {{ template "summary-row" (summaryRow .App "restrictions" + .Donor.Restrictions + (fromLink .App global.Paths.Restrictions "") + $donorFullName $canChange $isDonor) }} +
+ + {{ template "contextual-lpa-warning" . }} +{{ end }} diff --git a/web/template/layout/contextual-lpa-warning.gohtml b/web/template/layout/contextual-lpa-warning.gohtml new file mode 100644 index 0000000000..08b2e1d62e --- /dev/null +++ b/web/template/layout/contextual-lpa-warning.gohtml @@ -0,0 +1,3 @@ +{{ define "contextual-lpa-warning" }} + {{ template "warning" (content .App "thisIsNotTheRegisteredLpaWarning") }} +{{ end }} diff --git a/web/template/layout/contextual-lpa.gohtml b/web/template/layout/contextual-lpa.gohtml index 3539d6e58a..19c345cd6e 100644 --- a/web/template/layout/contextual-lpa.gohtml +++ b/web/template/layout/contextual-lpa.gohtml @@ -1,287 +1,146 @@ + + {{ define "contextual-lpa" }} - {{ $donorFullName := .Donor.Donor.FullName }} - {{ $isPropertyAndAffairs := .Donor.Type.IsPropertyAndAffairs }} + {{ $donorFullName := .Lpa.Donor.FullName }} + {{ $isPropertyAndAffairs := .Lpa.Type.IsPropertyAndAffairs }} {{ $isDonor := .App.IsDonor }} - {{ $canChange := and $isDonor (not .Donor.Tasks.ConfirmYourIdentityAndSign.IsCompleted) }} {{ template "contextual-lpa-warning" . }} - {{ with .Donor.Donor }} + {{ with .Lpa.Donor }}

{{ tr $.App "donor" }}: {{ .FullName }}

- {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLink $.App global.Paths.YourName "#f-first-names") - .FullName $canChange $isDonor) }} - - {{ template "optional-summary-row" (summaryRow $.App "otherNamesYouAreKnownBy" - .OtherNames - (fromLink $.App global.Paths.YourName "#f-other-names") - .FullName $canChange $isDonor) }} - - {{ template "summary-row" (summaryRow $.App "dateOfBirth" - (formatDate $.App .DateOfBirth) - (fromLink $.App global.Paths.YourDateOfBirth "#f-date-of-birth") - .FullName $canChange $isDonor) }} - - {{ template "summary-row" (summaryRow $.App "email" - .Email - "" - .FullName false $isDonor) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLink $.App global.Paths.YourAddress "#f-address-line-1") - .FullName $canChange $isDonor) }} - - {{ if $isDonor }} - {{ template "summary-row" (summaryRow $.App "preferredContactLanguage" - (tr $.App .ContactLanguagePreference.String) - (fromLink $.App global.Paths.YourPreferredLanguage "") - .FullName $canChange $isDonor) }} - {{ end }} + {{ template "summary-row" (staticSummaryRow $.App "dateOfBirth" + (formatDate $.App .DateOfBirth)) }} + {{ template "summary-row" (staticSummaryRow $.App "email" + .Email) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
{{ end }} - {{ with .Donor.CertificateProvider }} + {{ with .Lpa.CertificateProvider }}

{{ tr $.App "certificateProvider" }}: {{ .FullName }}

- {{ $contactValue := "" }} - {{ if .CarryOutBy.IsPaper }} - {{ $contactValue = tr $.App "usingPaperForms" }} - {{ else if .CarryOutBy.IsOnline }} - {{ $contactValue = tr $.App "byEmail" }} - {{ end }} - - {{ $addressLabel := tr $.App "address" }} - {{ if .Relationship.IsProfessionally }} - {{ $addressLabel = tr $.App "workAddress" }} - {{ end }} - - {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLink $.App global.Paths.CertificateProviderDetails "#f-first-names") - .FullName $canChange false ) }} - - {{ template "summary-row" (summaryRow $.App "mobile" - (formatPhone .Mobile) - (fromLink $.App global.Paths.CertificateProviderDetails "#f-mobile") - .FullName $canChange false ) }} - - {{ template "summary-row" (summaryRow $.App "contactPreference" - $contactValue - (fromLink $.App global.Paths.HowWouldCertificateProviderPreferToCarryOutTheirRole "") - .FullName $canChange false ) }} - - {{ template "optional-summary-row" (summaryRow $.App "email" - .Email - (fromLink $.App global.Paths.HowWouldCertificateProviderPreferToCarryOutTheirRole "#f-email") - .FullName $canChange false ) }} - - {{ template "address-summary-row" (summaryRow $.App $addressLabel - .Address - (fromLink $.App global.Paths.CertificateProviderAddress "#f-address-line-1") - .FullName $canChange false ) }} + {{ template "summary-row" (staticSummaryRow $.App "mobile" + (formatPhone .Phone)) }} + {{ template "summary-row" (staticSummaryRow $.App "email" + .Email) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
{{ end }} - {{ range .Donor.Attorneys.Attorneys }} + {{ range .Lpa.Attorneys.Attorneys }}

{{ tr $.App "attorney" }}: {{ .FullName }}

- - {{ if $canChange }} - - {{ end }}
- {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLinkActor $.App global.Paths.ChooseAttorneys .UID "#f-first-names") - .FullName $canChange false) }} - - {{ template "summary-row" (summaryRow $.App "dateOfBirth" - (formatDate $.App .DateOfBirth) - (fromLinkActor $.App global.Paths.ChooseAttorneys .UID "#f-date-of-birth") - .FullName $canChange false) }} - - {{ template "optional-summary-row" (summaryRow $.App "email" - .Email - (fromLinkActor $.App global.Paths.ChooseAttorneys .UID "#f-email") - .FullName $canChange false) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLinkActor $.App global.Paths.ChooseAttorneysAddress .UID "#f-address-line-1") - .FullName $canChange false) }} + {{ template "summary-row" (staticSummaryRow $.App "dateOfBirth" + (formatDate $.App .DateOfBirth)) }} + + {{ if .Mobile }} + {{ template "summary-row" (staticSummaryRow $.App "mobile" + .Mobile) }} + {{ end }} + + {{ template "summary-row" (staticSummaryRow $.App "email" + .Email) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
{{ end }} - {{ if .Donor.Attorneys.TrustCorporation.Name }} - {{ with .Donor.Attorneys.TrustCorporation }} + {{ if .Lpa.Attorneys.TrustCorporation.Name }} + {{ with .Lpa.Attorneys.TrustCorporation }}

{{ tr $.App "trustCorporationAttorney" }}: {{ .Name }}

- - {{ if $canChange }} - - {{ end }}
- {{ template "summary-row" (summaryRow $.App "name" - .Name - (fromLink $.App global.Paths.EnterTrustCorporation "#f-name") - .Name $canChange false) }} - - {{ template "summary-row" (summaryRow $.App "companyNumber" - .CompanyNumber - (fromLink $.App global.Paths.EnterTrustCorporation "#f-company-number") - .Name $canChange false) }} - - {{ template "optional-summary-row" (summaryRow $.App "companyEmailAddress" - .Email - (fromLink $.App global.Paths.EnterTrustCorporation "#f-email") - .Name $canChange false) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLink $.App global.Paths.EnterTrustCorporationAddress "#f-address-line-1") - .Name $canChange false) }} + {{ template "summary-row" (staticSummaryRow $.App "companyNumber" + .CompanyNumber) }} + {{ template "summary-row" (staticSummaryRow $.App "companyEmailAddress" + .Email) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
{{ end }} {{ end }} - {{ range .Donor.ReplacementAttorneys.Attorneys }} + {{ range .Lpa.ReplacementAttorneys.Attorneys }}

{{ tr $.App "replacementAttorney" }}: {{ .FullName }}

- - {{ if $canChange }} - - {{ end }}
- {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLinkActor $.App global.Paths.ChooseReplacementAttorneys .UID "#f-first-names") - .FullName $canChange (eq $.App.AttorneyUID .UID)) }} - - {{ template "summary-row" (summaryRow $.App "dateOfBirth" - (formatDate $.App .DateOfBirth) - (fromLinkActor $.App global.Paths.ChooseReplacementAttorneys .UID "#f-date-of-birth") - .FullName $canChange false) }} - - {{ template "optional-summary-row" (summaryRow $.App "email" - .Email - (fromLinkActor $.App global.Paths.ChooseReplacementAttorneys .UID "#f-email") - .FullName $canChange false) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLinkActor $.App global.Paths.ChooseReplacementAttorneysAddress .UID "#f-address-line-1") - .FullName $canChange false) }} + {{ template "summary-row" (staticSummaryRow $.App "dateOfBirth" + (formatDate $.App .DateOfBirth)) }} + + {{ if .Mobile }} + {{ template "summary-row" (staticSummaryRow $.App "mobile" + .Mobile) }} + {{ end }} + + {{ template "summary-row" (staticSummaryRow $.App "email" + .Email) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
{{ end }} - {{ if .Donor.ReplacementAttorneys.TrustCorporation.Name }} - {{ with .Donor.ReplacementAttorneys.TrustCorporation }} + {{ if .Lpa.ReplacementAttorneys.TrustCorporation.Name }} + {{ with .Lpa.ReplacementAttorneys.TrustCorporation }}

{{ tr $.App "replacementTrustCorporationAttorney" }}: {{ .Name }}

- - {{ if $canChange }} - - {{ end }}
- {{ template "summary-row" (summaryRow $.App "name" - .Name - (fromLink $.App global.Paths.EnterReplacementTrustCorporation "#f-name") - .Name $canChange false) }} - - {{ template "summary-row" (summaryRow $.App "companyNumber" - .CompanyNumber - (fromLink $.App global.Paths.EnterReplacementTrustCorporation "#f-company-number") - .Name $canChange false) }} - - {{ template "optional-summary-row" (summaryRow $.App "companyEmailAddress" - .Email - (fromLink $.App global.Paths.EnterReplacementTrustCorporation "#f-email") - .Name $canChange false) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLink $.App global.Paths.EnterReplacementTrustCorporationAddress "#f-address-line-1") - .Name $canChange false) }} + {{ template "summary-row" (staticSummaryRow $.App "companyNumber" + .CompanyNumber) }} + {{ template "summary-row" (staticSummaryRow $.App "companyEmailAddress" + .Email) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
{{ end }} {{ end }} - {{ if .Donor.DoYouWantToNotifyPeople.IsYes }} - {{ range .Donor.PeopleToNotify }} + {{ if .Lpa.PeopleToNotify }} + {{ range .Lpa.PeopleToNotify }}

{{ tr $.App "personToNotify" }}: {{ .FullName }}

- - {{ if $canChange }} - - {{ end }}
- {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLinkActor $.App global.Paths.ChoosePeopleToNotify .UID "#f-first-names") - .FullName $canChange false ) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLinkActor $.App global.Paths.ChoosePeopleToNotifyAddress .UID "#f-address-line-1") - .FullName $canChange false ) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
@@ -302,46 +161,28 @@
{{ end }} - {{ if .Donor.AuthorisedSignatory.FirstNames }} - {{ with .Donor.AuthorisedSignatory }} + {{ if .Lpa.AuthorisedSignatory.FirstNames }} + {{ with .Lpa.AuthorisedSignatory }}

{{ tr $.App "authorisedSignatory" }}: {{ .FullName }}

-
-
- {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLink $.App global.Paths.YourAuthorisedSignatory "#f-first-names") - .FullName $canChange false ) }} -
-
{{ end }} {{ end }} - {{ if .Donor.IndependentWitness.FirstNames }} - {{ with .Donor.IndependentWitness }} + {{ if .Lpa.IndependentWitness.FirstNames }} + {{ with .Lpa.IndependentWitness }}

{{ tr $.App "independentWitness" }}: {{ .FullName }}

- {{ template "summary-row" (summaryRow $.App "name" - .FullName - (fromLink $.App global.Paths.YourIndependentWitness "#f-first-names") - .FullName $canChange false ) }} - - {{ template "summary-row" (summaryRow $.App "mobile" - (formatPhone .Mobile) - (fromLink $.App global.Paths.YourIndependentWitnessMobile "#f-mobile") - .FullName $canChange false ) }} - - {{ template "address-summary-row" (summaryRow $.App "address" - .Address - (fromLink $.App global.Paths.YourIndependentWitnessAddress "#f-address-line-1") - .FullName $canChange false) }} + {{ template "summary-row" (staticSummaryRow $.App "mobile" + (formatPhone .Mobile)) }} + {{ template "address-summary-row" (staticSummaryRow $.App "address" + .Address) }}
@@ -353,7 +194,7 @@

{{ tr .App "howLpaCanBeUsed" }}

- {{ with .Donor.WhenCanTheLpaBeUsed }} + {{ with .Lpa.WhenCanTheLpaBeUsed }} {{ $label := "whenAttorneysCanUseTheLpa" }} {{ $value := printf "%s:3rd" .String }} @@ -362,26 +203,22 @@ {{ $value = .String }} {{ end }} - {{ template "summary-row" (summaryRow $.App $label - (tr $.App $value) - (fromLink $.App global.Paths.WhenCanTheLpaBeUsed "") - $donorFullName (and $canChange $isPropertyAndAffairs) $isDonor) }} + {{ template "summary-row" (staticSummaryRow $.App $label + (tr $.App $value)) }} {{ end }} - {{ if .Donor.Type.IsPersonalWelfare }} + {{ if .Lpa.Type.IsPersonalWelfare }} {{ $value := "optionB" }} - {{ if .Donor.LifeSustainingTreatmentOption.IsOptionA }} + {{ if .Lpa.LifeSustainingTreatmentOption.IsOptionA }} {{ $value = "optionA" }} {{ end }} - {{ template "summary-row" (summaryRow .App "lifeSustainingTreatment" - (trHtml .App $value) - (fromLink .App global.Paths.LifeSustainingTreatment "") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow .App "lifeSustainingTreatment" + (trHtml .App $value)) }} {{ end }} - {{ if .Donor.AttorneyDecisions.How }} - {{ with .Donor.AttorneyDecisions.How }} + {{ if .Lpa.AttorneyDecisions.How }} + {{ with .Lpa.AttorneyDecisions.How }} {{ $label := "howAttorneysMustMakeDecisions" }} {{ $value := .String }} @@ -390,15 +227,13 @@ {{ $value = printf "your-%s" .String }} {{ end }} - {{ template "summary-row" (summaryRow $.App $label - (tr $.App $value) - (fromLink $.App global.Paths.HowShouldAttorneysMakeDecisions "") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow $.App $label + (tr $.App $value)) }} {{ end }} {{ end }} - {{ if .Donor.HowShouldReplacementAttorneysStepIn }} - {{ with .Donor.HowShouldReplacementAttorneysStepIn }} + {{ if .Lpa.HowShouldReplacementAttorneysStepIn }} + {{ with .Lpa.HowShouldReplacementAttorneysStepIn }} {{ $label := "howReplacementAttorneysShouldStepIn" }} {{ if $isDonor }} {{ $label = "howYourReplacementAttorneysShouldStepIn" }} @@ -411,15 +246,13 @@ {{ $value = "whenNoneCanNoLongerAct" }} {{ end }} - {{ template "summary-row" (summaryRow $.App $label - (trHtml $.App $value) - (fromLink $.App global.Paths.HowShouldReplacementAttorneysStepIn "") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow $.App $label + (trHtml $.App $value)) }} {{ end }} {{ end }} - {{ if .Donor.ReplacementAttorneyDecisions.How }} - {{ with .Donor.ReplacementAttorneyDecisions.How }} + {{ if .Lpa.ReplacementAttorneyDecisions.How }} + {{ with .Lpa.ReplacementAttorneyDecisions.How }} {{ $label := "howReplacementAttorneysMustMakeDecisions" }} {{ $value := .String }} @@ -428,10 +261,8 @@ {{ $value = printf "your-%s" .String }} {{ end }} - {{ template "summary-row" (summaryRow $.App $label - (tr $.App $value) - (fromLink $.App global.Paths.HowShouldReplacementAttorneysMakeDecisions "") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow $.App $label + (tr $.App $value)) }} {{ end }} {{ end }}
@@ -441,54 +272,270 @@

{{ tr .App "restrictions" }}

- {{ if .Donor.AttorneyDecisions.How.IsJointlyForSomeSeverallyForOthers }} + {{ if .Lpa.AttorneyDecisions.How.IsJointlyForSomeSeverallyForOthers }} {{ $label := "decisionsAttorneysMustMakeJointly" }} {{ if $isDonor }} {{ $label = "decisionsYourAttorneysMustMakeJointly" }} {{ end }} - {{ template "summary-row" (summaryRow .App $label - (trHtml .App .Donor.AttorneyDecisions.Details) - (fromLink $.App global.Paths.HowShouldAttorneysMakeDecisions "#f-mixed-details") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow .App $label + (trHtml .App .Lpa.AttorneyDecisions.Details)) }} {{ end }} - {{ if .Donor.HowShouldReplacementAttorneysStepInDetails }} + {{ if .Lpa.HowShouldReplacementAttorneysStepInDetails }} {{ $label := "howReplacementAttorneysShouldStepIn" }} {{ if $isDonor }} {{ $label = "howYourReplacementAttorneysShouldStepIn" }} {{ end }} - {{ template "summary-row" (summaryRow .App $label - .Donor.HowShouldReplacementAttorneysStepInDetails - (fromLink $.App global.Paths.HowShouldReplacementAttorneysStepIn "#f-other-details") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow .App $label + .Lpa.HowShouldReplacementAttorneysStepInDetails) }} {{ end }} - {{ if .Donor.ReplacementAttorneyDecisions.How.IsJointlyForSomeSeverallyForOthers }} + {{ if .Lpa.ReplacementAttorneyDecisions.How.IsJointlyForSomeSeverallyForOthers }} {{ $label := "decisionsReplacementAttorneysMustMakeJointly" }} {{ if $isDonor }} {{ $label = "decisionsYourReplacementAttorneysMustMakeJointly" }} {{ end }} - {{ template "summary-row" (summaryRow .App $label - (trHtml .App .Donor.ReplacementAttorneyDecisions.Details) - (fromLink $.App global.Paths.HowShouldReplacementAttorneysMakeDecisions "#f-mixed-details") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow .App $label + (trHtml .App .Lpa.ReplacementAttorneyDecisions.Details)) }} {{ end }} - {{ template "summary-row" (summaryRow .App "restrictions" - .Donor.Restrictions - (fromLink .App global.Paths.Restrictions "") - $donorFullName $canChange $isDonor) }} + {{ template "summary-row" (staticSummaryRow .App "restrictions" + .Lpa.Restrictions) }}
{{ template "contextual-lpa-warning" . }} -{{ end }} -{{ define "contextual-lpa-warning" }} - {{ template "warning" (content .App "thisIsNotTheRegisteredLpaWarning") }} +

{{ tr .App "legalRightsAndResponsibilities" }}

+ + {{ trHtml .App (printf "yourLegalRightsAndResponsibilitiesContent:%s:h3" .Lpa.Type.String) }} + + {{ template "contextual-lpa-warning" . }} + +

{{ tr .App "signatures" }}

+ + {{ if .Lpa.SignedAt }} +
+
+

{{ tr $.App "donorSignature" }}

+
+
+

{{ tr .App "iConfirmThat" }}

+ +
    +
  • {{ tr .App "iHaveReadLpa" }}
  • + {{ if .Lpa.Type.IsPersonalWelfare }} +
  • {{ trFormat .App "iGiveAttorneysAuthority" "LpaType" (tr .App .Lpa.Type.String | lowerFirst) }}
  • + {{ else }} + {{ if .Lpa.WhenCanTheLpaBeUsed.IsHasCapacity }} +
  • {{ tr .App "iGiveAttorneysAuthorityWhenRegistered" }}
  • + {{ else }} +
  • {{ tr .App "iGiveAttorneysAuthorityWhenLostMentalCapacity" }}
  • + {{ end }} + {{ end }} + {{ if .Lpa.Type.IsPersonalWelfare }} + {{ if .Lpa.LifeSustainingTreatmentOption.IsOptionA }} +
  • {{ tr .App "iGiveMyAttorneysAuthorityLifeSustainingTreatment" }}
  • + {{ else }} +
  • {{ trHtml .App "iDoNotGiveMyAttorneysAuthorityLifeSustainingTreatment" }}
  • + {{ end }} + {{ end }} + {{ if gt (len .Lpa.PeopleToNotify) 0 }} +
  • {{ trFormatCount .App "iHaveChosenNPeopleToNotify" (len .Lpa.PeopleToNotify) }}
  • + {{ else }} +
  • {{ tr .App "iHaveNotChosenToNotifyAnyone" }}
  • + {{ end }} +
  • {{ tr .App "infoIProvidedCanBeUsedByOpg" }}
  • +
+ +
+
+ {{ if .Lpa.AuthorisedSignatory.FirstNames }} +
{{ trFormatHtml .App "signedOnBehalfByOn" "FullName" .Lpa.Donor.FullName "SignatoryFullName" .Lpa.AuthorisedSignatory.FullName }}
+ {{ else }} +
{{ trFormatHtml .App "signedByOn" "FullName" .Lpa.Donor.FullName }}
+ {{ end }} +
{{ formatDate .App .Lpa.SignedAt }}
+
+
+
{{ trFormatHtml .App "witnessedByOn" "FullName" .Lpa.CertificateProvider.FullName }}
+
{{ formatDate .App .Lpa.SignedAt }}
+
+
+
+
+ {{ end }} + + {{ if .Lpa.AuthorisedSignatory.FirstNames }} +
+
+

{{ tr $.App "witnessingOfDonorSignature" }}

+
+
+

{{ tr .App "iConfirmTheLpaWasSignedInMyPresence" }}

+ +
+
+
{{ trFormatHtml .App "witnessedByOn" "FullName" .Lpa.IndependentWitness.FullName }}
+
{{ formatDate .App .Lpa.SignedAt }}
+
+
+
+
+ {{ end }} + + {{ if not .Lpa.CertificateProvider.SignedAt.IsZero }} +
+
+

{{ tr $.App "certificateProviderSignature" }}

+
+
+ {{ trHtml .App "provideTheCertificateForThisLpaContent" }} + +
+
+
{{ trFormatHtml .App "signedByOn" "FullName" .Lpa.CertificateProvider.FullName }}
+
{{ formatDate .App .Lpa.CertificateProvider.SignedAt }}
+
+
+
+
+ {{ end }} + + {{ range .Lpa.Attorneys.Attorneys }} + {{ if not .SignedAt.IsZero }} +
+
+

{{ tr $.App "attorneySignature" }}

+
+
+

{{ tr $.App "iUnderstandAndConfirmThat" }}

+ +
    + {{ trHtml $.App "signAsAttorneyBullets" }} +
  • + {{ if $.Lpa.WhenCanTheLpaBeUsed.IsHasCapacity }} + {{ tr $.App "signAsAttorneyWhenRegisteredBullet" }} + {{ else }} + {{ tr $.App "signAsAttorneyWhenCapacityLostBullet" }} + {{ end }} +
  • +
+ +
+
+
{{ trFormatHtml $.App "signedByOn" "FullName" .FullName }}
+
{{ formatDate $.App .SignedAt }}
+
+
+
+
+ {{ end }} + {{ end }} + + {{ if .Lpa.Attorneys.TrustCorporation.Signatories }} +
+
+

{{ tr $.App "trustCorporationSignature" }}

+
+
+

{{ tr $.App "iUnderstandAndConfirmThat" }}

+ +
    + {{ trHtml $.App "signAsTrustCorporationBullets" }} +
  • + {{ if $.Lpa.WhenCanTheLpaBeUsed.IsHasCapacity }} + {{ tr $.App "signAsTrustCorporationWhenRegisteredBullet" }} + {{ else }} + {{ tr $.App "signAsTrustCorporationWhenCapacityLostBullet" }} + {{ end }} +
  • +
+ +
+ {{ range .Lpa.Attorneys.TrustCorporation.Signatories }} +
+
{{ trFormatHtml $.App "signedByOn" "FullName" .FullName }}
+
{{ formatDate $.App .SignedAt }}
+
+ {{ end }} +
+
+
+ {{ end }} + + {{ range .Lpa.ReplacementAttorneys.Attorneys }} + {{ if not .SignedAt.IsZero }} +
+
+

{{ tr $.App "replacementAttorneySignature" }}

+
+
+

{{ tr $.App "iUnderstandAndConfirmThat" }}

+ +
    + {{ trHtml $.App "signAsAttorneyBullets" }} +
  • + {{ if $.Lpa.WhenCanTheLpaBeUsed.IsHasCapacity }} + {{ tr $.App "signAsAttorneyWhenRegisteredBullet" }} + {{ else }} + {{ tr $.App "signAsAttorneyWhenCapacityLostBullet" }} + {{ end }} +
  • +
+ + {{ trHtml $.App "asReplacementAttorneyAlsoConfirmThat" }} + +
+
+
{{ trFormatHtml $.App "signedByOn" "FullName" .FullName }}
+
{{ formatDate $.App .SignedAt }}
+
+
+
+
+ {{ end }} + {{ end }} + + {{ if .Lpa.ReplacementAttorneys.TrustCorporation.Signatories }} + {{ with .Lpa.ReplacementAttorneys.TrustCorporation }} +
+
+

{{ tr $.App "replacementTrustCorporationSignature" }}

+
+
+

{{ tr $.App "iUnderstandAndConfirmThat" }}

+ +
    + {{ trHtml $.App "signAsTrustCorporationBullets" }} +
  • + {{ if $.Lpa.WhenCanTheLpaBeUsed.IsHasCapacity }} + {{ tr $.App "signAsTrustCorporationWhenRegisteredBullet" }} + {{ else }} + {{ tr $.App "signAsTrustCorporationWhenCapacityLostBullet" }} + {{ end }} +
  • +
+ + {{ trFormatHtml $.App "asReplacementTrustCorporationAlsoConfirmThat" "Name" .Name }} + +
+ {{ range .Signatories }} +
+
{{ trFormatHtml $.App "signedByOn" "FullName" .FullName }}
+
{{ formatDate $.App .SignedAt }}
+
+ {{ end }} +
+
+
+ {{ end }} + {{ end }} + + {{ template "contextual-lpa-warning" . }} {{ end }} diff --git a/web/template/layout/summary-row.gohtml b/web/template/layout/summary-row.gohtml index 71a16398e4..a4d27adf25 100644 --- a/web/template/layout/summary-row.gohtml +++ b/web/template/layout/summary-row.gohtml @@ -1,5 +1,5 @@ {{ define "summary-row" }} -
+
{{ tr .App .Label }}
{{ if .Value }}