From 174e9df16f168cc7e9375804e46e111b8db3b045 Mon Sep 17 00:00:00 2001 From: Joshua Hawxwell Date: Tue, 31 Oct 2023 14:54:14 +0000 Subject: [PATCH] Add content for repeat application evidence required --- internal/page/donor/previous_fee.go | 2 +- internal/page/donor/previous_fee_test.go | 4 +- internal/page/paths.go | 2 - lang/cy.json | 7 +++ lang/en.json | 21 +++++--- web/template/evidence_required.gohtml | 61 +++++++++++++----------- 6 files changed, 57 insertions(+), 40 deletions(-) diff --git a/internal/page/donor/previous_fee.go b/internal/page/donor/previous_fee.go index 19eb471003..7ebccb820d 100644 --- a/internal/page/donor/previous_fee.go +++ b/internal/page/donor/previous_fee.go @@ -42,7 +42,7 @@ func PreviousFee(tmpl template.Template, payer Payer, donorStore DonorStore) Han return payer.Pay(appData, w, r, lpa) } - return appData.Redirect(w, r, lpa, page.Paths.EvidenceRequiredForPreviousFee.Format(lpa.ID)) + return appData.Redirect(w, r, lpa, page.Paths.EvidenceRequired.Format(lpa.ID)) } } diff --git a/internal/page/donor/previous_fee_test.go b/internal/page/donor/previous_fee_test.go index dc6573a59e..05598920fe 100644 --- a/internal/page/donor/previous_fee_test.go +++ b/internal/page/donor/previous_fee_test.go @@ -121,7 +121,7 @@ func TestPostPreviousFeeWhenOtherFee(t *testing.T) { assert.Nil(t, err) assert.Equal(t, http.StatusFound, resp.StatusCode) - assert.Equal(t, page.Paths.EvidenceRequiredForPreviousFee.Format("lpa-id"), resp.Header.Get("Location")) + assert.Equal(t, page.Paths.EvidenceRequired.Format("lpa-id"), resp.Header.Get("Location")) } func TestPostPreviousFeeWhenNotChanged(t *testing.T) { @@ -141,7 +141,7 @@ func TestPostPreviousFeeWhenNotChanged(t *testing.T) { assert.Nil(t, err) assert.Equal(t, http.StatusFound, resp.StatusCode) - assert.Equal(t, page.Paths.EvidenceRequiredForPreviousFee.Format("lpa-id"), resp.Header.Get("Location")) + assert.Equal(t, page.Paths.EvidenceRequired.Format("lpa-id"), resp.Header.Get("Location")) } func TestPostPreviousFeeWhenStoreErrors(t *testing.T) { diff --git a/internal/page/paths.go b/internal/page/paths.go index 23bfa6ece7..1b8ff0be02 100644 --- a/internal/page/paths.go +++ b/internal/page/paths.go @@ -135,7 +135,6 @@ type AppPaths struct { EnterTrustCorporation LpaPath EnterTrustCorporationAddress LpaPath EvidenceRequired LpaPath - EvidenceRequiredForPreviousFee LpaPath FeeDenied LpaPath GettingHelpSigning LpaPath HowDoYouKnowYourCertificateProvider LpaPath @@ -330,5 +329,4 @@ var Paths = AppPaths{ YourIndependentWitnessAddress: "/your-independent-witness-address", YourIndependentWitnessMobile: "/your-independent-witness-mobile", YourLegalRightsAndResponsibilities: "/your-legal-rights-and-responsibilities", - EvidenceRequiredForPreviousFee: "/evidence-required-for-previous-fee", } diff --git a/lang/cy.json b/lang/cy.json index 7ce281217c..0910fe9da1 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -837,7 +837,10 @@ "repeatApplicationDiscount": "Welsh", "hardshipFeeWaiver": "Welsh", "evidenceRequiredHalfFee": "Welsh", + "newEvidenceRequiredHalf": "Welsh", "evidenceRequiredHalfFeeIntroContent": "

Welsh

Welsh

Welsh

Welsh

Welsh

", + "newEvidenceRequiredHalfFeeIntroContent": "

Welsh

", + "evidenceRequiredHalfFeeIncomeContent": "

Welsh

", "whereYourIncomeCanComeFrom": "Welsh", "whereYourIncomeCanComeFromDetail": "

Welsh

Welsh

", "evidenceRequiredHalfFeeEvidenceContent": "

Welsh

Welsh

Welsh

", @@ -845,12 +848,16 @@ "ifYouHaveNoIncomeDetail": "

Welsh

", "evidenceRequiredHalfFeeUniversalCreditContent": "

Welsh

Welsh

", "evidenceRequiredNoFee": "Welsh", + "newEvidenceRequiredExemption": "Welsh", "evidenceRequiredNoFeeIntroContent": "

Welsh

", + "newEvidenceRequiredNoFeeIntroContent": "

Welsh

", "eligibleMeansTestedBenefits": "Welsh", "eligibleMeansTestedBenefitsDetail": "

Welsh

Welsh Welsh Welsh

Welsh

Welsh

Welsh

", "evidenceRequiredNoFeeEvidenceContent": "

Welsh

Welsh

Welsh

", "evidenceRequiredHardshipFee": "Welsh", + "newEvidenceRequiredHardship": "Welsh", "evidenceRequiredHardshipFeeContent": "

Welsh

Welsh

Welsh

", + "newEvidenceRequiredHardshipFeeContent": "

Welsh

Welsh

Welsh

", "howWouldYouLikeToSendUsYourEvidence": "Welsh", "howWouldYouLikeToSendUsYourEvidenceContent": "

Welsh

", "howYouWouldLikeToSendUsYourEvidence": "Welsh", diff --git a/lang/en.json b/lang/en.json index 3bd9ecac03..46a7309661 100644 --- a/lang/en.json +++ b/lang/en.json @@ -781,20 +781,27 @@ "repeatApplicationDiscount": "Repeat application discount", "hardshipFeeWaiver": "Hardship (fee waiver)", "evidenceRequiredHalfFee": "Evidence required to pay a half fee", - "evidenceRequiredHalfFeeIntroContent": "

You’ve told us you’re applying to pay a half fee for your LPA.

What evidence we need depends on whether you’re applying based on your income or because you get Universal Credit.

If you’re applying based on your income

If your gross annual income (your yearly income before tax) is less than £12,000, you can apply for a half fee.

You need to upload or send us recent proof of your gross annual income.

", + "newEvidenceRequiredHalf": "New evidence required to pay a half fee", + "evidenceRequiredHalfFeeIntroContent": "

You’ve told us you’re applying to pay a half fee for your LPA.

What evidence we need depends on whether you’re applying based on your income or because you get Universal Credit.

", + "newEvidenceRequiredHalfFeeIntroContent": "

You’ve told us that you previously made an LPA application and that you paid a half fee (a ‘remission’).

You must provide new evidence to pay a half fee on this application.

What evidence we need depends on whether you’re applying based on your income or because you get Universal Credit.

", + "evidenceRequiredHalfFeeIncomeContent": "

If you’re applying based on your income

If your gross annual income (your yearly income before tax) is less than £12,000, you can apply for a half fee.

You need to upload or send us recent proof of your gross annual income.

", "whereYourIncomeCanComeFrom": "Where your income can come from", - "whereYourIncomeCanComeFromDetail": "

Your income can be from:

It can also come from non-means-tested benefits, such as:

", - "evidenceRequiredHalfFeeEvidenceContent": "

Supporting evidence of your income

Your evidence can come from:

We do not accept bank statements.

", + "whereYourIncomeCanComeFromDetail": "

Your income can be from:

It can also come from non-means-tested benefits, such as:

", + "evidenceRequiredHalfFeeEvidenceContent": "

Supporting evidence of your income

Your evidence can come from:

We do not accept bank statements.

", "ifYouHaveNoIncome": "If you have no income", "ifYouHaveNoIncomeDetail": "

If you receive no income, you must write a signed statement explaining how you support yourself.

", - "evidenceRequiredHalfFeeUniversalCreditContent": "

If you’re applying based on Universal Credit

If you’re applying to pay a half fee because you get Universal Credit, you need to upload or send us copies of letters that:

", + "evidenceRequiredHalfFeeUniversalCreditContent": "

If you’re applying based on Universal Credit

If you’re applying to pay a half fee because you get Universal Credit, you need to upload or send us copies of letters that:

", "evidenceRequiredNoFee": "Evidence required to pay no fee", + "newEvidenceRequiredExemption": "New evidence required to pay no fee", "evidenceRequiredNoFeeIntroContent": "

You’ve told us you’re applying to pay no fee because you currently receive an eligible means-tested benefit.

", + "newEvidenceRequiredNoFeeIntroContent": "

You’ve told us that you previously made an LPA application and that you paid no fee because you got an exemption.

You must provide evidence to qualify for an exemption on your new application.

You must currently receive an eligible means-tested benefit.

", "eligibleMeansTestedBenefits": "Eligible means-tested benefits", - "eligibleMeansTestedBenefitsDetail": "

You can apply to pay no fee (an ‘exemption’) if you currently get:

Or if you get a combination of Working Tax Credit and at least one of these:

Disability Living Allowance, Invalidity Benefit and Personal Independence Payment are not included.

Personal injury damages exclusion

If you were awarded personal injury damages of more than £16,000 and these were ignored when you were assessed for any of these benefits, you do not qualify for an exemption.

", - "evidenceRequiredNoFeeEvidenceContent": "

Supporting evidence

You need to upload or send us copies of letters from a benefit provider showing that you currently get at least one eligible benefit.

Letters must:

", + "eligibleMeansTestedBenefitsDetail": "

You can apply to pay no fee (an ‘exemption’) if you currently get:

Or if you get a combination of Working Tax Credit and at least one of these:

Disability Living Allowance, Invalidity Benefit and Personal Independence Payment are not included.

Personal injury damages exclusion

If you were awarded personal injury damages of more than £16,000 and these were ignored when you were assessed for any of these benefits, you do not qualify for an exemption.

", + "evidenceRequiredNoFeeEvidenceContent": "

Supporting evidence

You need to upload or send us copies of letters from a benefit provider showing that you currently get at least one eligible benefit.

Letters must:

", "evidenceRequiredHardshipFee": "Evidence required for a hardship application", - "evidenceRequiredHardshipFeeContent": "

You’ve told us that you’d like to make a hardship application to have your LPA fee waived.

To apply, you need to:

You can upload these online or send them to us in the post.

", + "newEvidenceRequiredHardship": "New evidence required for a hardship application", + "evidenceRequiredHardshipFeeContent": "

You’ve told us that you’d like to make a hardship application to have your LPA fee waived.

To apply, you need to:

You can upload these online or send them to us in the post.

", + "newEvidenceRequiredHardshipFeeContent": "

You’ve told us that you previously made an LPA application and that you paid no fee because you were approved for a hardship fee waiver.

You can apply again, but you will need to provide new evidence.

To apply, you need to:

You can upload these online or send them to us in the post.

", "howWouldYouLikeToSendUsYourEvidence": "How would you like to send us your evidence?", "howWouldYouLikeToSendUsYourEvidenceContent": "

You can upload your supporting evidence on the next page, or you can send it to us in the post.

", "howYouWouldLikeToSendUsYourEvidence": "how you would like to send us your evidence", diff --git a/web/template/evidence_required.gohtml b/web/template/evidence_required.gohtml index 383b63a723..6622da6edc 100644 --- a/web/template/evidence_required.gohtml +++ b/web/template/evidence_required.gohtml @@ -1,40 +1,45 @@ {{ template "page" . }} -{{ define "pageTitle" }}{{ tr .App (printf "evidenceRequired%s" .Lpa.FeeType.String) }}{{ end }} +{{ define "pageTitle" }} + {{ if .Lpa.FeeType.IsRepeatApplicationFee }} + {{ tr .App (printf "newEvidenceRequired%s" .Lpa.PreviousFee.String) }} + {{ else }} + {{ tr .App (printf "evidenceRequired%s" .Lpa.FeeType.String) }} + {{ end }} +{{ end }} {{ define "main" }} - {{ $pageTitle := printf "evidenceRequired%s" .Lpa.FeeType.String }} -
-

{{ tr .App $pageTitle }}

- - {{ if .Lpa.FeeType.IsHalfFee }} - {{ trHtml .App "evidenceRequiredHalfFeeIntroContent" }} - - {{ template "details" details . "whereYourIncomeCanComeFrom" "whereYourIncomeCanComeFromDetail" false }} +

{{ template "pageTitle" . }}

- {{ trHtml .App "evidenceRequiredHalfFeeEvidenceContent" }} - - {{ template "details" details . "ifYouHaveNoIncome" "ifYouHaveNoIncomeDetail" false }} - - {{ trHtml .App "evidenceRequiredHalfFeeUniversalCreditContent" }} + {{ if or .Lpa.FeeType.IsHalfFee .Lpa.PreviousFee.IsPreviousFeeHalf }} + {{ if .Lpa.FeeType.IsRepeatApplicationFee }} + {{ trHtml .App "newEvidenceRequiredHalfFeeIntroContent" }} + {{ else }} + {{ trHtml .App "evidenceRequiredHalfFeeIntroContent" }} {{ end }} - - {{ if .Lpa.FeeType.IsNoFee }} + {{ trHtml .App "evidenceRequiredHalfFeeIncomeContent" }} + {{ template "details" (details . "whereYourIncomeCanComeFrom" "whereYourIncomeCanComeFromDetail" false) }} + {{ trHtml .App "evidenceRequiredHalfFeeEvidenceContent" }} + {{ template "details" (details . "ifYouHaveNoIncome" "ifYouHaveNoIncomeDetail" false) }} + {{ trHtml .App "evidenceRequiredHalfFeeUniversalCreditContent" }} + + {{ else if or .Lpa.FeeType.IsNoFee .Lpa.PreviousFee.IsPreviousFeeExemption }} + {{ if .Lpa.FeeType.IsRepeatApplicationFee }} + {{ trHtml .App "newEvidenceRequiredNoFeeIntroContent" }} + {{ else }} {{ trHtml .App "evidenceRequiredNoFeeIntroContent" }} - - {{ template "details" details . "eligibleMeansTestedBenefits" "eligibleMeansTestedBenefitsDetail" false }} - - {{ trHtml .App "evidenceRequiredNoFeeEvidenceContent" }} - {{ end }} - - {{ if .Lpa.FeeType.IsHardshipFee }} - {{ trHtml .App "evidenceRequiredHardshipFeeContent" }} - {{ end }} - - {{ if .Lpa.FeeType.IsRepeatApplicationFee }} - {{ trHtml .App "placeholder" }} + {{ end }} + {{ template "details" (details . "eligibleMeansTestedBenefits" "eligibleMeansTestedBenefitsDetail" false) }} + {{ trHtml .App "evidenceRequiredNoFeeEvidenceContent" }} + + {{ else if or .Lpa.FeeType.IsHardshipFee .Lpa.PreviousFee.IsPreviousFeeHardship }} + {{ if .Lpa.FeeType.IsRepeatApplicationFee }} + {{ trHtml .App "newEvidenceRequiredHardshipFeeContent" }} + {{ else }} + {{ trHtml .App "evidenceRequiredHardshipFeeContent" }} + {{ end }} {{ end }}