Skip to content

Commit

Permalink
MLPAB-1257 MLPAB-1258 Personal welfare changes (#811)
Browse files Browse the repository at this point in the history
* Show relevant example restrictions for lpa type
* Show when personal welfare LPA can be used
  • Loading branch information
hawx authored Oct 31, 2023
1 parent 1350f05 commit b6a6bd3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/donor/check-your-lpa.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ describe('Check the LPA', () => {
cy.visit('/fixtures?redirect=/check-your-lpa&progress=peopleToNotifyAboutYourLpa');
});

it('cannot change when personal welfare LPA can be used', () => {
cy.visit('/fixtures?redirect=/check-your-lpa&progress=peopleToNotifyAboutYourLpa&lpa-type=hw');

cy.contains('.govuk-summary-list__row', 'When your attorneys can use your LPA')
.contains('Only when I do not have mental capacity')
.contains('Change').should('not.exist');
});

it("can submit the completed LPA", () => {
cy.contains('h1', "Check your LPA")

Expand Down
3 changes: 2 additions & 1 deletion lang/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@
"restrictionsOnYourAttorneysPowerTitle": "Cyfyngu ar y penderfyniadau y gall eich atwrneiod eu gwneud",
"restrictionsOnYourAttorneysPowerContent": "<p class=\"govuk-body\">Gallwch gyfyngu ar y penderfyniadau y gall eich atwrneiod eu gwneud drwy ychwanegu cyfyngiadau neu amodau at eich LPA.</p><p class=\"govuk-body\">Mae’r adran hon yn ddewisol.</p><p class=\"govuk-body\">Bydd yr hyn a ddywedwch yma yn dweud wrth John a Joan am y pethau:</p><ul class=\"govuk-list govuk-list--bullet\"><li>na allant eu gwneud (‘cyfyngiadau’)</li><li>y gellir eu gwneud mewn rhai amgylchiadau yn unig (‘amodau’)</li></ul><p class=\"govuk-body\">Nid oes rhaid i chi ychwanegu cyfyngiadau neu amodau at eich LPA.</p><p class=\"govuk-body\">Mae yna reolau cyfreithiol ynglŷn â sut dylid geirio eich cyfyngiadau a’ch amodau, felly mae’n bwysig <a href=\"#\" class=\"govuk-link\">darllen ein canllawiau ar ysgrifennu cyfyngiadau ac amodau</a>.</p><p class=\"govuk-body\">Os ydych yn ansicr, neu os oes gennych gyfyngiadau neu amodau manwl, dylech gael cyngor cyfreithiol.</p>",
"restrictionExamples": "Dangoswch rai enghreifftiau i fi",
"restrictionExamplesContent": "<h2 class=\"govuk-heading-s\">Enghreifftiau o gyfyngiadau: pethau na all yr atwrneiod eu gwneud</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘Ni all fy atwrneiod werthu fy nghartref.’</li></ul><h2 class=\"govuk-heading-s\">Enghreifftiau o amodau: pethau y gall eich atwrneiod eu gwneud mewn rhai amgylchiadau yn unig</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘Ni all fy atwrneiod werthu fy nghartref oni bai, ym marn fy meddyg, ni allaf fyw’n annibynnol mwyach.’</li></ul>",
"restrictionExamplesContentPfa": "<h2 class=\"govuk-heading-s\">Enghreifftiau o gyfyngiadau: pethau na all yr atwrneiod eu gwneud</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘Ni all fy atwrneiod werthu fy nghartref.’</li></ul><h2 class=\"govuk-heading-s\">Enghreifftiau o amodau: pethau y gall eich atwrneiod eu gwneud mewn rhai amgylchiadau yn unig</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘Ni all fy atwrneiod werthu fy nghartref oni bai, ym marn fy meddyg, ni allaf fyw’n annibynnol mwyach.’</li></ul>",
"restrictionExamplesContentHw": "<h2 class=\"govuk-heading-s\">Welsh</h2>",
"restrictions": "Cyfyngiadau ac amodau",
"restrictionsOptional": "Cyfyngiadau ac amodau (dewisol)",
"restrictionsHint": "Os nad ydych eisiau ychwanegu unrhyw gyfyngiadau neu amodau, gadewch y blwch yn wag.",
Expand Down
3 changes: 2 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@
"restrictionsOnYourAttorneysPowerTitle": "Restrict the decisions your attorneys can make",
"restrictionsOnYourAttorneysPowerContent": "<p class=\"govuk-body\">You can limit the decisions your attorneys can make by adding restrictions or conditions to your LPA.</p><p class=\"govuk-body\">This section is optional.</p><p class=\"govuk-body\">What you say here will tell your attorneys things they:</p><ul class=\"govuk-list govuk-list--bullet\"><li>cannot do (‘restrictions’)</li><li>can only do in certain circumstances (‘conditions’)</li></ul><p class=\"govuk-body\">You do not have to add restrictions or conditions to your LPA.</p><p class=\"govuk-body\">There are legal rules about how your restrictions and conditions should be worded, so it’s important to <a href=\"#\" class=\"govuk-link\">read our guidance on writing restrictions and conditions</a>.</p><p class=\"govuk-body\">If you’re unsure, or you have detailed restrictions or conditions, you should get legal advice.</p>",
"restrictionExamples": "Show me some examples",
"restrictionExamplesContent": "<h2 class=\"govuk-heading-s\">Example restrictions: things the attorneys cannot do</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘My attorneys cannot sell my home.’</li></ul><h2 class=\"govuk-heading-s\">Example conditions: things your attorneys can only do in certain circumstances</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘My attorneys must not sell my home unless, in my doctor’s opinion, I can no longer live independently.’</li></ul>",
"restrictionExamplesContentPfa": "<h2 class=\"govuk-heading-s\">Example restrictions: things the attorneys cannot do</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘My attorneys cannot sell my home.’</li></ul><h2 class=\"govuk-heading-s\">Example conditions: things your attorneys can only do in certain circumstances</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘My attorneys must not sell my home unless, in my doctor’s opinion, I can no longer live independently.’</li></ul>",
"restrictionExamplesContentHw": "<h2 class=\"govuk-heading-s\">Example restrictions: things the attorneys cannot do</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘My attorneys cannot move me into a care home.’</li></ul><h2 class=\"govuk-heading-s\">Example conditions: things your attorneys can only do in certain circumstances</h2><ul class=\"govuk-list govuk-list--bullet\"><li>‘My attorneys can only make the decision to move me to a care home if a doctor has determined that I can no longer live alone.’</li></ul>",
"restrictions": "Restrictions and conditions",
"restrictionsOptional": "Restrictions and conditions (optional)",
"restrictionsHelp": "It’s important that you word any restrictions and conditions clearly and carefully.",
Expand Down
8 changes: 6 additions & 2 deletions web/template/layout/lpa-decisions.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@
{{ end }}
</dt>
<dd class="govuk-summary-list__value">
{{ tr .App .Lpa.WhenCanTheLpaBeUsed.String }}
{{ if .Lpa.Type.IsPropertyFinance }}
{{ tr .App .Lpa.WhenCanTheLpaBeUsed.String }}
{{ else if .Lpa.Type.IsHealthWelfare }}
{{ tr .App "when-capacity-lost" }}
{{ end }}
</dd>
{{ if $canChange }}
{{ if and $canChange .Lpa.Type.IsPropertyFinance }}
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="{{ link .App (.App.Paths.WhenCanTheLpaBeUsed.Format .App.LpaID) }}">
{{ tr .App "change" }}<span class="govuk-visually-hidden"> {{ tr .App "whenYourAttorneysCanUseYourLpa" }}</span>
Expand Down
6 changes: 5 additions & 1 deletion web/template/restrictions.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

{{ trFormatHtml .App "restrictionsOnYourAttorneysPowerContent" "AllAttorneysFirstNames" (concatAnd .App .Lpa.Attorneys.FirstNames) }}

{{ template "details" (details . "restrictionExamples" "restrictionExamplesContent" false) }}
{{ if .Lpa.Type.IsHealthWelfare }}
{{ template "details" (details . "restrictionExamples" "restrictionExamplesContentHw" false) }}
{{ else }}
{{ template "details" (details . "restrictionExamples" "restrictionExamplesContentPfa" false) }}
{{ end }}

{{ if .Lpa.LifeSustainingTreatmentOption.IsOptionA }}
<p class="govuk-inset-text">{{ tr .App "youCanIncludeRestrictionsAboutLst" }}</p>
Expand Down

0 comments on commit b6a6bd3

Please sign in to comment.