Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

MLPAB-2194 Update read your lpa page to be like the contextual lpa design #1366

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
580 changes: 288 additions & 292 deletions cypress/e2e/donor/confirm-your-identity-and-sign.cy.js

Large diffs are not rendered by default.

35 changes: 7 additions & 28 deletions internal/templatefn/fn.go
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@ import (

humanize "github.com/dustin/go-humanize"
"github.com/ministryofjustice/opg-modernising-lpa/internal/actor"
"github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid"
"github.com/ministryofjustice/opg-modernising-lpa/internal/date"
"github.com/ministryofjustice/opg-modernising-lpa/internal/localize"
"github.com/ministryofjustice/opg-modernising-lpa/internal/lpastore"
"github.com/ministryofjustice/opg-modernising-lpa/internal/page"
"github.com/ministryofjustice/opg-modernising-lpa/internal/place"
)

// Globals contains values that are used in templates and do not change as the
@@ -53,6 +53,7 @@ func All(globals *Globals) map[string]any {
"inc": inc,
"link": link,
"fromLink": fromLink,
"fromLinkActor": fromLinkActor,
"stringContains": strings.Contains,
"tr": tr,
"trFormat": trFormat,
@@ -82,8 +83,6 @@ func All(globals *Globals) map[string]any {
"checkboxEq": checkboxEq,
"lpaDecisions": lpaDecisions,
"summaryRow": summaryRow,
"addressSummaryRow": addressSummaryRow,
"optionalSummaryRow": optionalSummaryRow,
}
}

@@ -195,6 +194,10 @@ func fromLink(app page.AppData, path lpaIDPath, field string) string {
return app.Lang.URL(path.Format(app.LpaID)) + "?from=" + app.Page + field
}

func fromLinkActor(app page.AppData, path lpaIDPath, uid actoruid.UID, field string) string {
return app.Lang.URL(path.Format(app.LpaID)) + "?from=" + app.Page + "&id=" + uid.String() + field
}

// checkboxEq allows matching in the checkboxes.gohtml template for a value that
// is a list of strings, or a single string (where we are emulating a switch)
func checkboxEq(needle string, in any) bool {
@@ -496,31 +499,7 @@ func lpaDecisions(app page.AppData, lpa any, canChange bool) lpaDecisionsData {
return data
}

func summaryRow(app page.AppData, label, value, changeLink, fullName string, canChange, summarisingSelf bool) map[string]any {
return map[string]any{
"App": app,
"Label": label,
"Value": value,
"ChangeLink": changeLink,
"FullName": fullName,
"CanChange": canChange,
"SummarisingSelf": summarisingSelf,
}
}

func addressSummaryRow(app page.AppData, label string, address place.Address, changeLink, fullName string, canChange, summarisingSelf bool) map[string]any {
return map[string]any{
"App": app,
"Label": label,
"Address": address,
"ChangeLink": changeLink,
"FullName": fullName,
"CanChange": canChange,
"SummarisingSelf": summarisingSelf,
}
}

func optionalSummaryRow(app page.AppData, label, value, changeLink, fullName string, canChange, summarisingSelf bool) map[string]any {
func summaryRow(app page.AppData, label string, value any, changeLink, fullName string, canChange, summarisingSelf bool) map[string]any {
return map[string]any{
"App": app,
"Label": label,
46 changes: 9 additions & 37 deletions internal/templatefn/fn_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package templatefn

import (
"fmt"
"html/template"
"testing"
"time"
@@ -11,7 +12,6 @@ import (
"github.com/ministryofjustice/opg-modernising-lpa/internal/localize"
"github.com/ministryofjustice/opg-modernising-lpa/internal/lpastore"
"github.com/ministryofjustice/opg-modernising-lpa/internal/page"
"github.com/ministryofjustice/opg-modernising-lpa/internal/place"
"github.com/stretchr/testify/assert"
)

@@ -166,6 +166,14 @@ func TestFromLink(t *testing.T) {
fromLink(page.AppData{LpaID: "lpa-id", Page: "/previous", Lang: localize.Cy}, page.Paths.Attorney.ConfirmYourDetails, ""))
}

func TestFromLinkActor(t *testing.T) {
uid := actoruid.New()
assert.Equal(t, fmt.Sprintf("/lpa/lpa-id/your-details?from=/previous&id=%s#f-first-names", uid.String()),
fromLinkActor(page.AppData{LpaID: "lpa-id", Page: "/previous"}, page.Paths.YourDetails, uid, "#f-first-names"))
assert.Equal(t, "/cy/attorney/lpa-id/confirm-your-details?from=/previous&id="+uid.String(),
fromLinkActor(page.AppData{LpaID: "lpa-id", Page: "/previous", Lang: localize.Cy}, page.Paths.Attorney.ConfirmYourDetails, uid, ""))
}

func TestCheckboxEq(t *testing.T) {
assert.True(t, checkboxEq("b", []string{"a", "b", "c"}))
assert.False(t, checkboxEq("d", []string{"a", "b", "c"}))
@@ -579,39 +587,3 @@ func TestSummaryRow(t *testing.T) {
"SummarisingSelf": true,
}, summaryRow(app, label, value, changeLink, fullName, true, true))
}

func TestAddressSummaryRow(t *testing.T) {
app := page.AppData{SessionID: "abc"}
label := "a-label"
address := place.Address{Line1: "a"}
changeLink := "a-link.com"
fullName := "Full Name"

assert.Equal(t, map[string]any{
"App": app,
"Label": label,
"Address": address,
"ChangeLink": changeLink,
"FullName": fullName,
"CanChange": true,
"SummarisingSelf": true,
}, addressSummaryRow(app, label, address, changeLink, fullName, true, true))
}

func TestOptionalSummaryRow(t *testing.T) {
app := page.AppData{SessionID: "abc"}
label := "a-label"
value := "aValue"
changeLink := "a-link.com"
fullName := "Full Name"

assert.Equal(t, map[string]any{
"App": app,
"Label": label,
"Value": value,
"ChangeLink": changeLink,
"FullName": fullName,
"CanChange": true,
"SummarisingSelf": true,
}, optionalSummaryRow(app, label, value, changeLink, fullName, true, true))
}
6 changes: 5 additions & 1 deletion lang/cy.json
Original file line number Diff line number Diff line change
@@ -1297,5 +1297,9 @@
"becauseYouHaveChosenJointlyContent": "<p class=\"govuk-body\">Welsh</p>",
"becauseYouHaveChosenJointlyForSomeSeverallyForOthers": "Welsh",
"becauseYouHaveChosenJointlyForSomeSeverallyForOthersContent": "<p class=\"govuk-body\">Welsh</p>",
"youProvidedThisEmailForDonorError": "Welsh {{.DonorFullName}}"
"youProvidedThisEmailForDonorError": "Welsh {{.DonorFullName}}",
"thisIsNotTheRegisteredLpaWarning": "Welsh",
"howLpaCanBeUsed": "Welsh",
"trustCorporationAttorney": "Welsh",
"replacementTrustCorporationAttorney": "Welsh"
}
6 changes: 5 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
@@ -1226,5 +1226,9 @@
"becauseYouHaveChosenJointlyContent": "<p class=\"govuk-body\">If one of your original attorneys dies or can no longer act, your LPA will stop working unless you have appointed replacement attorneys.</p><p class=\"govuk-body\">Replacement attorneys are important because they step in if an original attorney can no longer act.</p><h2 class=\"govuk-heading-m\">Appointing replacement attorneys</h2><p class=\"govuk-body\">When you have replacement attorneys and one of your original attorneys dies or can no longer act:</p><ul class=\"govuk-list govuk-list--bullet\"><li>all of your original attorneys will be replaced by the replacement attorneys, unless you state otherwise in your restrictions and conditions</li><li>your original attorneys will no longer be able to make decisions for you</li></ul><p class=\"govuk-body\">You can add your replacement attorneys from the task list.</p>",
"becauseYouHaveChosenJointlyForSomeSeverallyForOthers": "Because you have chosen for your attorneys to act jointly for some decisions and severally for others",
"becauseYouHaveChosenJointlyForSomeSeverallyForOthersContent": "<p class=\"govuk-body\">If one of your original attorneys dies or can no longer act, joint decisions can no longer be made unless either:</p><ul class=\"govuk-list govuk-list--bullet\"><li>you say that your original attorneys can continue to make these joint decisions in your restrictions and conditions</li><li>you appoint replacement attorneys who can step in</li></ul><h2 class=\"govuk-heading-m\">Appointing replacement attorneys</h2><p class=\"govuk-body\">Replacement attorneys are important because they step in if an original attorney can no longer act.</p><p class=\"govuk-body\">When you have replacement attorneys and one of your original attorneys dies or can no longer act:</p><ul class=\"govuk-list govuk-list--bullet\"><li>all the replacement attorneys step in and take over making joint decisions</li><li>the replacement and remaining original attorneys can make all other decisions together or individually</li></ul><p class=\"govuk-body\">You can choose your replacement attorneys from the task list.</p>",
"youProvidedThisEmailForDonorError": "You have already provided this email address for the donor, {{.DonorFullName}}. The correspondent’s email address must be different."
"youProvidedThisEmailForDonorError": "You have already provided this email address for the donor, {{.DonorFullName}}. The correspondent’s email address must be different.",
"thisIsNotTheRegisteredLpaWarning": "This is not the registered LPA. You cannot use it or give organisations access to it.",
"howLpaCanBeUsed": "How the LPA can be used",
"trustCorporationAttorney": "Trust corporation attorney",
"replacementTrustCorporationAttorney": "Replacement trust corporation attorney"
}
11 changes: 8 additions & 3 deletions web/assets/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* Modernising Patterns */
@import "patterns/progress_bar";
@import "patterns/service_header";
@import "patterns/trans_switch";
@import "patterns/data_loss_warning";
@import "patterns/loading_spinner";
@import "patterns/progress_bar";
@import "patterns/service_header";
@import "patterns/stacked_summary_list";
@import "patterns/supporter-lpa-context";
@import "patterns/trans_switch";

.app-float-right {
float: right;
@@ -167,3 +168,7 @@ body.js-enabled .js-only {
display: block;
}
}

.app-unbold {
font-weight: normal !important;
}
19 changes: 19 additions & 0 deletions web/assets/scss/patterns/stacked_summary_list.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.app-stacked-summary-list {
display: block;
}

.app-stacked-summary-list .govuk-summary-list__row {
display: block;
@include govuk-responsive-padding(4, "bottom");
}

.app-stacked-summary-list .govuk-summary-list__key,
.app-stacked-summary-list .govuk-summary-list__value {
display: block;
width: 100%;
}

.app-stacked-summary-list .govuk-summary-list__actions {
text-align: unset;
width: 100%;
}
4 changes: 2 additions & 2 deletions web/template/attorney/confirm_your_details.gohtml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@
{{ template "summary-row" (summaryRow .App "companyName" .TrustCorporation.Name "" $attorneyFullName false true ) }}
{{ template "summary-row" (summaryRow .App "companyNumber" .TrustCorporation.CompanyNumber "" $attorneyFullName false true ) }}
{{ template "summary-row" (summaryRow .App "companyEmailAddress" .TrustCorporation.Email "" $attorneyFullName false true ) }}
{{ template "address-summary-row" (addressSummaryRow .App "address" .TrustCorporation.Address "" $attorneyFullName false true ) }}
{{ template "address-summary-row" (summaryRow .App "address" .TrustCorporation.Address "" $attorneyFullName false true ) }}
</dl>

{{ template "details" (details . "whatToDoIfAnyDetailsAboutCompanyAreIncorrect" "whatToDoIfAnyDetailsAboutCompanyAreIncorrectAttorneyContent" false) }}
@@ -42,7 +42,7 @@
<dl class="govuk-summary-list">
{{ template "summary-row" (summaryRow .App "name" .Attorney.FullName "" $attorneyFullName false true ) }}
{{ template "summary-row" (summaryRow .App "dateOfBirth" (formatDate .App .Attorney.DateOfBirth) "" $attorneyFullName false true ) }}
{{ template "address-summary-row" (addressSummaryRow .App "address" .Attorney.Address "" $attorneyFullName false true ) }}
{{ template "address-summary-row" (summaryRow .App "address" .Attorney.Address "" $attorneyFullName false true ) }}
</dl>

{{ template "details" (details . "whatToDoIfAnyDetailsAreIncorrect" "whatToDoIfAnyDetailsAreIncorrectAttorneyContent" false) }}
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@

{{ if .Lpa.CertificateProvider.Relationship.IsProfessionally }}
{{ $homeAddressChangeLink := printf "%s?from=%s#f-address-line-1" (link .App (global.Paths.CertificateProvider.WhatIsYourHomeAddress.Format .Lpa.LpaID)) .App.Page }}
{{ template "address-summary-row" (addressSummaryRow $.App "homeAddress" .CertificateProvider.HomeAddress $homeAddressChangeLink .Lpa.CertificateProvider.FullName true true ) }}
{{ template "address-summary-row" (summaryRow $.App "homeAddress" .CertificateProvider.HomeAddress $homeAddressChangeLink .Lpa.CertificateProvider.FullName true true ) }}
{{ end }}

{{ $contactLanguageChangeLink := printf "%s#f-language-preference" (link .App (global.Paths.CertificateProvider.YourPreferredLanguage.Format .Lpa.LpaID)) }}
@@ -29,7 +29,7 @@

<dl class="govuk-summary-list">
{{ template "summary-row" (summaryRow $.App "name" .Lpa.CertificateProvider.FullName "" .Lpa.CertificateProvider.FullName false true ) }}
{{ template "address-summary-row" (addressSummaryRow $.App (tr .App .AddressLabel) .Lpa.CertificateProvider.Address "" .Lpa.CertificateProvider.FullName false true ) }}
{{ template "address-summary-row" (summaryRow $.App (tr .App .AddressLabel) .Lpa.CertificateProvider.Address "" .Lpa.CertificateProvider.FullName false true ) }}
{{ template "summary-row" (summaryRow $.App (tr .App .PhoneNumberLabel) (formatPhone .Lpa.CertificateProvider.Phone) "" .Lpa.CertificateProvider.FullName false true ) }}
</dl>

2 changes: 1 addition & 1 deletion web/template/donor/check_your_details.gohtml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
(fromLink .App global.Paths.YourDetails "#f-date-of-birth")
"" true true
) }}
{{ template "address-summary-row" (addressSummaryRow .App "address"
{{ template "address-summary-row" (summaryRow .App "address"
.Donor.Donor.Address
(fromLink .App global.Paths.YourAddress "#f-address-line-1")
"" true true
2 changes: 1 addition & 1 deletion web/template/donor/onelogin_identity_details.gohtml
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@

{{ template "summary-row" (summaryRow .App "dateOfBirth" (formatDate .App $userData.DateOfBirth) "" $donorFullName false true ) }}

{{ template "address-summary-row" (addressSummaryRow $.App "address" $userData.CurrentAddress "" $donorFullName false true ) }}
{{ template "address-summary-row" (summaryRow $.App "address" $userData.CurrentAddress "" $donorFullName false true ) }}
</dl>
</div>
</div>
28 changes: 8 additions & 20 deletions web/template/donor/read_your_lpa.gohtml
Original file line number Diff line number Diff line change
@@ -3,27 +3,15 @@
{{ define "pageTitle" }}{{ tr .App "readYourLpa" }}{{ end }}

{{ define "main" }}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-xl">{{ tr .App "readYourLpa" }}</h1>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-xl">{{ tr .App "readYourLpa" }}</h1>

{{ template "warning" (content .App "readAndCheckYourLpa") }}
</div>

<div class="govuk-grid-column-two-thirds">
<h2 id="decisions" class="govuk-heading-l govuk-!-margin-bottom-2">
{{ tr .App "lpaDecisions" }}
</h2>

{{ template "lpa-decisions" (lpaDecisions .App .Donor (not .Donor.Tasks.ConfirmYourIdentityAndSign.IsCompleted)) }}

<h2 class="govuk-heading-l govuk-!-margin-bottom-2">
{{ tr .App "peopleNamedOnTheLpa" }}
</h2>

{{ template "people-named-on-lpa" (lpaDecisions .App .Donor (not .Donor.Tasks.ConfirmYourIdentityAndSign.IsCompleted)) }}
{{ template "warning" (content .App "readAndCheckYourLpa") }}

{{ template "buttons" (button .App "continue" "link" (global.Paths.YourLpaLanguage.Format .App.LpaID)) }}
{{ template "contextual-lpa" . }}

{{ template "buttons" (button .App "continue" "link" (global.Paths.YourLpaLanguage.Format .App.LpaID)) }}
</div>
</div>
</div>
{{ end }}
8 changes: 4 additions & 4 deletions web/template/layout/address-summary-row.gohtml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{ define "address-summary-row" }}
<div class="govuk-summary-list__row{{ if or (eq "" .Address.Line1) (not .CanChange) }} govuk-summary-list__row--no-actions{{ end }}">
<div class="govuk-summary-list__row{{ if or (eq "" .Value.Line1) (not .CanChange) }} govuk-summary-list__row--no-actions{{ end }}">
<dt class="govuk-summary-list__key">{{ tr .App .Label }}</dt>
<dd class="govuk-summary-list__value">
{{ if .Address.Line1 }}
{{ template "address-lines" .Address }}
{{ if .Value.Line1 }}
{{ template "address-lines" .Value }}
{{ else if .CanChange }}
<a href="{{ .ChangeLink }}" class="govuk-link">
{{ tr .App "enter" }} {{ lowerFirst (tr .App .Label) }} {{ if not .SummarisingSelf }}<span class="govuk-visually-hidden"> {{ trFormat .App "forFullName" "FullName" .FullName }}</span>{{ end }}
</a>
{{ end }}
</dd>
{{ if and (ne .Address.Line1 "") .CanChange }}
{{ if and (ne .Value.Line1 "") .CanChange }}
<dd class="govuk-summary-list__actions">
<a class="govuk-link govuk-link--no-visited-state" href="{{ .ChangeLink }}">{{ tr .App "change" }}<span class="govuk-visually-hidden">
{{ lowerFirst (tr .App .Label) }} {{ if not .SummarisingSelf }}{{ lowerFirst (tr .App .Label) }} {{ trFormat .App "forFullName" "FullName" .FullName }}{{ end }}
8 changes: 4 additions & 4 deletions web/template/layout/attorney-summary.gohtml
Original file line number Diff line number Diff line change
@@ -25,10 +25,10 @@
{{ template "summary-row" (summaryRow $.App "companyNumber" .TrustCorporation.CompanyNumber $companyNumberChangeLink .TrustCorporation.Name $.CanChange (eq $.App.AttorneyUID .TrustCorporation.UID)) }}

{{ $companyEmailAddressChangeLink := printf "%s#f-email" (link .App .Link.TrustCorporation) }}
{{ template "optional-summary-row" (optionalSummaryRow $.App "companyEmailAddress" .TrustCorporation.Email $companyEmailAddressChangeLink .TrustCorporation.Name $.CanChange (eq $.App.AttorneyUID .TrustCorporation.UID)) }}
{{ template "optional-summary-row" (summaryRow $.App "companyEmailAddress" .TrustCorporation.Email $companyEmailAddressChangeLink .TrustCorporation.Name $.CanChange (eq $.App.AttorneyUID .TrustCorporation.UID)) }}

{{ $companyAddressChangeLink := printf "%s#f-address-line-1" (link .App .Link.TrustCorporationAddress) }}
{{ template "address-summary-row" (addressSummaryRow $.App "address" .TrustCorporation.Address $companyAddressChangeLink .TrustCorporation.Name $.CanChange (eq $.App.AttorneyUID .TrustCorporation.UID)) }}
{{ template "address-summary-row" (summaryRow $.App "address" .TrustCorporation.Address $companyAddressChangeLink .TrustCorporation.Name $.CanChange (eq $.App.AttorneyUID .TrustCorporation.UID)) }}
</dl>
</div>
</div>
@@ -60,10 +60,10 @@
{{ template "summary-row" (summaryRow $.App "dateOfBirth" (formatDate $.App .DateOfBirth) $dobChangeLink .FullName $.CanChange (eq $.App.AttorneyUID .UID)) }}

{{ $emailChangeLink := printf "%s&id=%s#f-email" (link $.App $.Link.Attorney) .UID }}
{{ template "optional-summary-row" (optionalSummaryRow $.App "email" .Email $emailChangeLink .FullName $.CanChange (eq $.App.AttorneyUID .UID)) }}
{{ template "optional-summary-row" (summaryRow $.App "email" .Email $emailChangeLink .FullName $.CanChange (eq $.App.AttorneyUID .UID)) }}

{{ $addressChangeLink := printf "%s&id=%s#f-address-line-1" (link $.App $.Link.AttorneyAddress) .UID }}
{{ template "address-summary-row" (addressSummaryRow $.App "address" .Address $addressChangeLink .FullName $.CanChange (eq $.App.AttorneyUID .UID)) }}
{{ template "address-summary-row" (summaryRow $.App "address" .Address $addressChangeLink .FullName $.CanChange (eq $.App.AttorneyUID .UID)) }}
</dl>
</div>
</div>
4 changes: 2 additions & 2 deletions web/template/layout/certificate-provider-details.gohtml
Original file line number Diff line number Diff line change
@@ -20,12 +20,12 @@
{{ template "summary-row" (summaryRow $.App "contactPreference" $contactValue $carryOutByLink .Lpa.CertificateProvider.FullName .CanChange $.App.IsCertificateProvider ) }}

{{ $emailChangeLink := printf "%s#f-email" $carryOutByLink }}
{{ template "optional-summary-row" (optionalSummaryRow $.App "email" .Lpa.CertificateProvider.Email $emailChangeLink .Lpa.CertificateProvider.FullName .CanChange $.App.IsCertificateProvider ) }}
{{ template "optional-summary-row" (summaryRow $.App "email" .Lpa.CertificateProvider.Email $emailChangeLink .Lpa.CertificateProvider.FullName .CanChange $.App.IsCertificateProvider ) }}

{{ $addressChangeLink := printf "%s#f-address-line-1" $addressLink }}
{{ $addressLabel := tr .App "address" }}
{{ if .Lpa.CertificateProvider.Relationship.IsProfessionally }} {{ $addressLabel = tr .App "workAddress" }} {{ end }}
{{ template "address-summary-row" (addressSummaryRow $.App $addressLabel .Lpa.CertificateProvider.Address $addressChangeLink .Lpa.CertificateProvider.FullName .CanChange $.App.IsCertificateProvider ) }}
{{ template "address-summary-row" (summaryRow $.App $addressLabel .Lpa.CertificateProvider.Address $addressChangeLink .Lpa.CertificateProvider.FullName .CanChange $.App.IsCertificateProvider ) }}
</dl>
</div>
</div>
478 changes: 478 additions & 0 deletions web/template/layout/contextual-lpa.gohtml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions web/template/layout/donor-details.gohtml
Original file line number Diff line number Diff line change
@@ -9,15 +9,15 @@
{{ template "summary-row" (summaryRow $.App "name" .Lpa.Donor.FullName $nameChangeLink .Lpa.Donor.FullName .CanChange $.App.IsDonor) }}

{{ $otherNameChangeLink := printf "%s?from=%s#f-other-names" (link .App (global.Paths.YourDetails.Format .App.LpaID)) .App.Page }}
{{ template "optional-summary-row" (optionalSummaryRow $.App "otherNamesYouAreKnownBy" .Lpa.Donor.OtherNames $otherNameChangeLink .Lpa.Donor.FullName .CanChange $.App.IsDonor) }}
{{ template "optional-summary-row" (summaryRow $.App "otherNamesYouAreKnownBy" .Lpa.Donor.OtherNames $otherNameChangeLink .Lpa.Donor.FullName .CanChange $.App.IsDonor) }}

{{ $dateOfBirthChangeLink := printf "%s?from=%s#f-date-of-birth" (link .App (global.Paths.YourDetails.Format .App.LpaID)) .App.Page }}
{{ template "summary-row" (summaryRow $.App "dateOfBirth" (formatDate $.App .Lpa.Donor.DateOfBirth) $dateOfBirthChangeLink .Lpa.Donor.FullName .CanChange $.App.IsDonor) }}

{{ template "summary-row" (summaryRow $.App "email" .Lpa.Donor.Email "" .Lpa.Donor.FullName false $.App.IsDonor) }}

{{ $addressChangeLink := printf "%s?from=%s#f-address-line-1" (link .App (global.Paths.YourAddress.Format .App.LpaID)) .App.Page }}
{{ template "address-summary-row" (addressSummaryRow $.App "address" .Lpa.Donor.Address $addressChangeLink .Lpa.Donor.FullName .CanChange $.App.IsDonor) }}
{{ template "address-summary-row" (summaryRow $.App "address" .Lpa.Donor.Address $addressChangeLink .Lpa.Donor.FullName .CanChange $.App.IsDonor) }}

{{ if $.App.IsDonor }}
{{ $languageChangeLink := printf "%s?from=%s" (link .App (global.Paths.YourPreferredLanguage.Format .App.LpaID)) .App.Page }}
2 changes: 1 addition & 1 deletion web/template/layout/people-to-notify-summary.gohtml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
{{ template "summary-row" (summaryRow $.App "name" .FullName $nameChangeLink .FullName $.CanChange false ) }}

{{ $addressChangeLink := printf "%s#f-address-line-1" $addressLink }}
{{ template "address-summary-row" (addressSummaryRow $.App "address" .Address $addressChangeLink .FullName $.CanChange false ) }}
{{ template "address-summary-row" (summaryRow $.App "address" .Address $addressChangeLink .FullName $.CanChange false ) }}
</dl>
</div>
</div>