From 4af87c90d5cf4f137c06a7ce97aaa7fe35460eda Mon Sep 17 00:00:00 2001 From: Joshua Hawxwell Date: Tue, 31 Oct 2023 11:48:10 +0000 Subject: [PATCH] Add page to select fee previously paid --- internal/page/data.go | 54 +++-- internal/page/data_test.go | 49 +++- .../page/donor/previous_application_number.go | 2 +- .../donor/previous_application_number_test.go | 2 +- internal/page/donor/previous_fee.go | 74 ++++++ internal/page/donor/previous_fee_test.go | 218 ++++++++++++++++++ internal/page/donor/register.go | 6 +- internal/page/enum_previousfee.go | 78 +++++++ internal/page/paths.go | 6 +- lang/cy.json | 9 +- lang/en.json | 9 +- web/template/previous_fee.gohtml | 29 +++ 12 files changed, 502 insertions(+), 34 deletions(-) create mode 100644 internal/page/donor/previous_fee.go create mode 100644 internal/page/donor/previous_fee_test.go create mode 100644 internal/page/enum_previousfee.go create mode 100644 web/template/previous_fee.gohtml diff --git a/internal/page/data.go b/internal/page/data.go index 9c52acdccc..53d6e4a669 100644 --- a/internal/page/data.go +++ b/internal/page/data.go @@ -77,17 +77,15 @@ const ( RepeatApplicationFee ) -func (i FeeType) Cost() int { - if i.IsFullFee() { - return 8200 - } +//go:generate enumerator -type PreviousFee -empty +type PreviousFee uint8 - if i.IsHalfFee() { - return 4100 - } - - return 0 -} +const ( + PreviousFeeFull PreviousFee = iota + 1 + PreviousFeeHalf + PreviousFeeExemption + PreviousFeeHardship +) // Lpa contains all the data related to the LPA application type Lpa struct { @@ -110,8 +108,6 @@ type Lpa struct { CertificateProvider actor.CertificateProvider // Type of LPA being drafted Type LpaType - // PreviousApplicationNumber if the application is related to an existing application - PreviousApplicationNumber string // Whether the applicant wants to add replacement attorneys WantReplacementAttorneys form.YesNo // When the LPA can be used @@ -172,6 +168,10 @@ type Lpa struct { FeeType FeeType // Evidence is the documents uploaded by a donor to apply for non-full fees Evidence Evidence + // PreviousApplicationNumber if the application is related to an existing application + PreviousApplicationNumber string + // PreviousFee is the fee previously paid for an LPA + PreviousFee PreviousFee HasSentApplicationUpdatedEvent bool HasSentPreviousApplicationLinkedEvent bool @@ -524,6 +524,30 @@ func (l *Lpa) TrustCorporationsNames() []string { return names } +func (l *Lpa) Cost() int { + if l.Tasks.PayForLpa.IsDenied() { + return 8200 + } + + switch l.FeeType { + case FullFee: + return 8200 + case HalfFee: + return 4100 + case RepeatApplicationFee: + switch l.PreviousFee { + case PreviousFeeFull: + return 4100 + case PreviousFeeHalf: + return 2050 + default: + return 0 + } + default: + return 0 + } +} + func (l *Lpa) FeeAmount() int { paid := 0 @@ -531,11 +555,7 @@ func (l *Lpa) FeeAmount() int { paid += payment.Amount } - if l.Tasks.PayForLpa.IsDenied() { - return FullFee.Cost() - paid - } else { - return l.FeeType.Cost() - paid - } + return l.Cost() - paid } func (l *Lpa) HasUnsentReducedFeesEvidence() bool { diff --git a/internal/page/data_test.go b/internal/page/data_test.go index 06dc47e7f2..460467a004 100644 --- a/internal/page/data_test.go +++ b/internal/page/data_test.go @@ -1031,17 +1031,48 @@ func TestChooseReplacementAttorneysState(t *testing.T) { } } -func TestFeeTypeCost(t *testing.T) { - testCases := map[FeeType]int{ - FullFee: 8200, - HalfFee: 4100, - NoFee: 0, - HardshipFee: 0, +func TestLpaCost(t *testing.T) { + testCases := map[string]struct { + lpa *Lpa + expected int + }{ + "full": { + lpa: &Lpa{FeeType: FullFee}, + expected: 8200, + }, + "half": { + lpa: &Lpa{FeeType: HalfFee}, + expected: 4100, + }, + "no fee": { + lpa: &Lpa{FeeType: NoFee}, + expected: 0, + }, + "hardship": { + lpa: &Lpa{FeeType: HardshipFee}, + expected: 0, + }, + "repeat full": { + lpa: &Lpa{FeeType: RepeatApplicationFee, PreviousFee: PreviousFeeFull}, + expected: 4100, + }, + "repeat half": { + lpa: &Lpa{FeeType: RepeatApplicationFee, PreviousFee: PreviousFeeHalf}, + expected: 2050, + }, + "repeat exemption": { + lpa: &Lpa{FeeType: RepeatApplicationFee, PreviousFee: PreviousFeeExemption}, + expected: 0, + }, + "repeat hardship": { + lpa: &Lpa{FeeType: RepeatApplicationFee, PreviousFee: PreviousFeeHardship}, + expected: 0, + }, } - for feeType, expectedCost := range testCases { - t.Run(feeType.String(), func(t *testing.T) { - assert.Equal(t, expectedCost, feeType.Cost()) + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + assert.Equal(t, tc.expected, tc.lpa.Cost()) }) } } diff --git a/internal/page/donor/previous_application_number.go b/internal/page/donor/previous_application_number.go index 52a48bbe3e..75795a299d 100644 --- a/internal/page/donor/previous_application_number.go +++ b/internal/page/donor/previous_application_number.go @@ -37,7 +37,7 @@ func PreviousApplicationNumber(tmpl template.Template, donorStore DonorStore) Ha } if lpa.PreviousApplicationNumber[0] == '7' { - return appData.Redirect(w, r, lpa, page.Paths.WhatWasYourOriginalFee.Format(lpa.ID)) + return appData.Redirect(w, r, lpa, page.Paths.PreviousFee.Format(lpa.ID)) } else { return appData.Redirect(w, r, lpa, page.Paths.WhatHappensAfterNoFee.Format(lpa.ID)) } diff --git a/internal/page/donor/previous_application_number_test.go b/internal/page/donor/previous_application_number_test.go index d65368a234..5802711587 100644 --- a/internal/page/donor/previous_application_number_test.go +++ b/internal/page/donor/previous_application_number_test.go @@ -71,7 +71,7 @@ func TestGetPreviousApplicationNumberWhenTemplateErrors(t *testing.T) { func TestPostPreviousApplicationNumber(t *testing.T) { testcases := map[string]page.LpaPath{ - "7": page.Paths.WhatWasYourOriginalFee, + "7": page.Paths.PreviousFee, "M": page.Paths.WhatHappensAfterNoFee, } diff --git a/internal/page/donor/previous_fee.go b/internal/page/donor/previous_fee.go new file mode 100644 index 0000000000..19eb471003 --- /dev/null +++ b/internal/page/donor/previous_fee.go @@ -0,0 +1,74 @@ +package donor + +import ( + "net/http" + + "github.com/ministryofjustice/opg-go-common/template" + "github.com/ministryofjustice/opg-modernising-lpa/internal/page" + "github.com/ministryofjustice/opg-modernising-lpa/internal/validation" +) + +type previousFeeData struct { + App page.AppData + Errors validation.List + Form *previousFeeForm + Options page.PreviousFeeOptions +} + +func PreviousFee(tmpl template.Template, payer Payer, donorStore DonorStore) Handler { + return func(appData page.AppData, w http.ResponseWriter, r *http.Request, lpa *page.Lpa) error { + data := &previousFeeData{ + App: appData, + Form: &previousFeeForm{ + PreviousFee: lpa.PreviousFee, + }, + Options: page.PreviousFeeValues, + } + + if r.Method == http.MethodPost { + data.Form = readPreviousFeeForm(r) + data.Errors = data.Form.Validate() + + if data.Errors.None() { + if lpa.PreviousFee != data.Form.PreviousFee { + lpa.PreviousFee = data.Form.PreviousFee + + if err := donorStore.Put(r.Context(), lpa); err != nil { + return err + } + } + + if lpa.PreviousFee.IsPreviousFeeFull() { + return payer.Pay(appData, w, r, lpa) + } + + return appData.Redirect(w, r, lpa, page.Paths.EvidenceRequiredForPreviousFee.Format(lpa.ID)) + } + } + + return tmpl(w, data) + } +} + +type previousFeeForm struct { + PreviousFee page.PreviousFee + Error error +} + +func readPreviousFeeForm(r *http.Request) *previousFeeForm { + previousFee, err := page.ParsePreviousFee(page.PostFormString(r, "previous-fee")) + + return &previousFeeForm{ + PreviousFee: previousFee, + Error: err, + } +} + +func (f *previousFeeForm) Validate() validation.List { + var errors validation.List + + errors.Error("previous-fee", "howMuchYouPreviouslyPaid", f.Error, + validation.Selected()) + + return errors +} diff --git a/internal/page/donor/previous_fee_test.go b/internal/page/donor/previous_fee_test.go new file mode 100644 index 0000000000..dc6573a59e --- /dev/null +++ b/internal/page/donor/previous_fee_test.go @@ -0,0 +1,218 @@ +package donor + +import ( + "net/http" + "net/http/httptest" + "net/url" + "strings" + "testing" + + "github.com/ministryofjustice/opg-modernising-lpa/internal/page" + "github.com/ministryofjustice/opg-modernising-lpa/internal/validation" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestGetPreviousFee(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodGet, "/", nil) + + template := newMockTemplate(t) + template. + On("Execute", w, &previousFeeData{ + App: testAppData, + Form: &previousFeeForm{}, + Options: page.PreviousFeeValues, + }). + Return(nil) + + err := PreviousFee(template.Execute, nil, nil)(testAppData, w, r, &page.Lpa{}) + resp := w.Result() + + assert.Nil(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) +} + +func TestGetPreviousFeeFromStore(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodGet, "/", nil) + + template := newMockTemplate(t) + template. + On("Execute", w, &previousFeeData{ + App: testAppData, + Form: &previousFeeForm{ + PreviousFee: page.PreviousFeeHalf, + }, + Options: page.PreviousFeeValues, + }). + Return(nil) + + err := PreviousFee(template.Execute, nil, nil)(testAppData, w, r, &page.Lpa{PreviousFee: page.PreviousFeeHalf}) + resp := w.Result() + + assert.Nil(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) +} + +func TestGetPreviousFeeWhenTemplateErrors(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodGet, "/", nil) + + template := newMockTemplate(t) + template. + On("Execute", w, mock.Anything). + Return(expectedError) + + err := PreviousFee(template.Execute, nil, nil)(testAppData, w, r, &page.Lpa{}) + resp := w.Result() + + assert.Equal(t, expectedError, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) +} + +func TestPostPreviousFeeWhenFullFee(t *testing.T) { + form := url.Values{ + "previous-fee": {page.PreviousFeeFull.String()}, + } + + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodPost, "/", strings.NewReader(form.Encode())) + r.Header.Add("Content-Type", page.FormUrlEncoded) + + lpa := &page.Lpa{ + ID: "lpa-id", + PreviousFee: page.PreviousFeeFull, + } + + donorStore := newMockDonorStore(t) + donorStore. + On("Put", r.Context(), lpa). + Return(nil) + + payer := newMockPayer(t) + payer. + On("Pay", testAppData, w, r, lpa). + Return(nil) + + err := PreviousFee(nil, payer, donorStore)(testAppData, w, r, &page.Lpa{ID: "lpa-id"}) + assert.Nil(t, err) +} + +func TestPostPreviousFeeWhenOtherFee(t *testing.T) { + form := url.Values{ + "previous-fee": {page.PreviousFeeHalf.String()}, + } + + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodPost, "/", strings.NewReader(form.Encode())) + r.Header.Add("Content-Type", page.FormUrlEncoded) + + donorStore := newMockDonorStore(t) + donorStore. + On("Put", r.Context(), &page.Lpa{ + ID: "lpa-id", + PreviousFee: page.PreviousFeeHalf, + }). + Return(nil) + + err := PreviousFee(nil, nil, donorStore)(testAppData, w, r, &page.Lpa{ID: "lpa-id"}) + resp := w.Result() + + assert.Nil(t, err) + assert.Equal(t, http.StatusFound, resp.StatusCode) + assert.Equal(t, page.Paths.EvidenceRequiredForPreviousFee.Format("lpa-id"), resp.Header.Get("Location")) +} + +func TestPostPreviousFeeWhenNotChanged(t *testing.T) { + form := url.Values{ + "previous-fee": {page.PreviousFeeHalf.String()}, + } + + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodPost, "/", strings.NewReader(form.Encode())) + r.Header.Add("Content-Type", page.FormUrlEncoded) + + err := PreviousFee(nil, nil, nil)(testAppData, w, r, &page.Lpa{ + ID: "lpa-id", + PreviousFee: page.PreviousFeeHalf, + }) + resp := w.Result() + + assert.Nil(t, err) + assert.Equal(t, http.StatusFound, resp.StatusCode) + assert.Equal(t, page.Paths.EvidenceRequiredForPreviousFee.Format("lpa-id"), resp.Header.Get("Location")) +} + +func TestPostPreviousFeeWhenStoreErrors(t *testing.T) { + form := url.Values{ + "previous-fee": {page.PreviousFeeHalf.String()}, + } + + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodPost, "/", strings.NewReader(form.Encode())) + r.Header.Add("Content-Type", page.FormUrlEncoded) + + donorStore := newMockDonorStore(t) + donorStore. + On("Put", r.Context(), mock.Anything). + Return(expectedError) + + err := PreviousFee(nil, nil, donorStore)(testAppData, w, r, &page.Lpa{}) + + assert.Equal(t, expectedError, err) +} + +func TestPostPreviousFeeWhenValidationErrors(t *testing.T) { + w := httptest.NewRecorder() + r, _ := http.NewRequest(http.MethodPost, "/", strings.NewReader("")) + r.Header.Add("Content-Type", page.FormUrlEncoded) + + template := newMockTemplate(t) + template. + On("Execute", w, mock.MatchedBy(func(data *previousFeeData) bool { + return assert.Equal(t, validation.With("previous-fee", validation.SelectError{Label: "howMuchYouPreviouslyPaid"}), data.Errors) + })). + Return(nil) + + err := PreviousFee(template.Execute, nil, nil)(testAppData, w, r, &page.Lpa{}) + resp := w.Result() + + assert.Nil(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) +} + +func TestReadPreviousFeeForm(t *testing.T) { + form := url.Values{ + "previous-fee": {page.PreviousFeeHalf.String()}, + } + + r, _ := http.NewRequest(http.MethodPost, "/", strings.NewReader(form.Encode())) + r.Header.Add("Content-Type", page.FormUrlEncoded) + + result := readPreviousFeeForm(r) + assert.Equal(t, page.PreviousFeeHalf, result.PreviousFee) +} + +func TestPreviousFeeFormValidate(t *testing.T) { + testCases := map[string]struct { + form *previousFeeForm + errors validation.List + }{ + "valid": { + form: &previousFeeForm{}, + }, + "invalid": { + form: &previousFeeForm{ + Error: expectedError, + }, + errors: validation.With("previous-fee", validation.SelectError{Label: "howMuchYouPreviouslyPaid"}), + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + assert.Equal(t, tc.errors, tc.form.Validate()) + }) + } +} diff --git a/internal/page/donor/register.go b/internal/page/donor/register.go index b7eee091c1..162e88499a 100644 --- a/internal/page/donor/register.go +++ b/internal/page/donor/register.go @@ -198,8 +198,6 @@ func Register( YourAddress(logger, tmpls.Get("your_address.gohtml"), addressClient, donorStore)) handleWithLpa(page.Paths.LpaType, None, LpaType(tmpls.Get("lpa_type.gohtml"), donorStore)) - handleWithLpa(page.Paths.PreviousApplicationNumber, None, - PreviousApplicationNumber(tmpls.Get("previous_application_number.gohtml"), donorStore)) handleWithLpa(page.Paths.CheckYouCanSign, None, CheckYouCanSign(tmpls.Get("check_you_can_sign.gohtml"), donorStore)) handleWithLpa(page.Paths.NeedHelpSigningConfirmation, None, @@ -303,6 +301,10 @@ func Register( AreYouApplyingForFeeDiscountOrExemption(tmpls.Get("are_you_applying_for_a_different_fee_type.gohtml"), payer, donorStore)) handleWithLpa(page.Paths.WhichFeeTypeAreYouApplyingFor, CanGoBack, WhichFeeTypeAreYouApplyingFor(tmpls.Get("which_fee_type_are_you_applying_for.gohtml"), donorStore)) + handleWithLpa(page.Paths.PreviousApplicationNumber, None, + PreviousApplicationNumber(tmpls.Get("previous_application_number.gohtml"), donorStore)) + handleWithLpa(page.Paths.PreviousFee, CanGoBack, + PreviousFee(tmpls.Get("previous_fee.gohtml"), payer, donorStore)) handleWithLpa(page.Paths.EvidenceRequired, CanGoBack, Guidance(tmpls.Get("evidence_required.gohtml"))) handleWithLpa(page.Paths.HowWouldYouLikeToSendEvidence, CanGoBack, diff --git a/internal/page/enum_previousfee.go b/internal/page/enum_previousfee.go new file mode 100644 index 0000000000..e880f20a69 --- /dev/null +++ b/internal/page/enum_previousfee.go @@ -0,0 +1,78 @@ +// Code generated by "enumerator -type PreviousFee -empty"; DO NOT EDIT. +package page + +import ( + "fmt" + "strconv" +) + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[PreviousFeeFull-1] + _ = x[PreviousFeeHalf-2] + _ = x[PreviousFeeExemption-3] + _ = x[PreviousFeeHardship-4] +} + +const _PreviousFee_name = "FullHalfExemptionHardship" + +var _PreviousFee_index = [...]uint8{0, 4, 8, 17, 25} + +func (i PreviousFee) String() string { + i -= 1 + if i >= PreviousFee(len(_PreviousFee_index)-1) { + return "PreviousFee(" + strconv.FormatInt(int64(i+1), 10) + ")" + } + return _PreviousFee_name[_PreviousFee_index[i]:_PreviousFee_index[i+1]] +} + +func (i PreviousFee) IsPreviousFeeFull() bool { + return i == PreviousFeeFull +} + +func (i PreviousFee) IsPreviousFeeHalf() bool { + return i == PreviousFeeHalf +} + +func (i PreviousFee) IsPreviousFeeExemption() bool { + return i == PreviousFeeExemption +} + +func (i PreviousFee) IsPreviousFeeHardship() bool { + return i == PreviousFeeHardship +} + +func ParsePreviousFee(s string) (PreviousFee, error) { + switch s { + case "Full": + return PreviousFeeFull, nil + case "Half": + return PreviousFeeHalf, nil + case "Exemption": + return PreviousFeeExemption, nil + case "Hardship": + return PreviousFeeHardship, nil + default: + return PreviousFee(0), fmt.Errorf("invalid PreviousFee '%s'", s) + } +} + +type PreviousFeeOptions struct { + PreviousFeeFull PreviousFee + PreviousFeeHalf PreviousFee + PreviousFeeExemption PreviousFee + PreviousFeeHardship PreviousFee +} + +var PreviousFeeValues = PreviousFeeOptions{ + PreviousFeeFull: PreviousFeeFull, + PreviousFeeHalf: PreviousFeeHalf, + PreviousFeeExemption: PreviousFeeExemption, + PreviousFeeHardship: PreviousFeeHardship, +} + +func (i PreviousFee) Empty() bool { + return i == PreviousFee(0) +} diff --git a/internal/page/paths.go b/internal/page/paths.go index aaa0ab0f7b..23bfa6ece7 100644 --- a/internal/page/paths.go +++ b/internal/page/paths.go @@ -135,6 +135,7 @@ type AppPaths struct { EnterTrustCorporation LpaPath EnterTrustCorporationAddress LpaPath EvidenceRequired LpaPath + EvidenceRequiredForPreviousFee LpaPath FeeDenied LpaPath GettingHelpSigning LpaPath HowDoYouKnowYourCertificateProvider LpaPath @@ -173,7 +174,7 @@ type AppPaths struct { UseExistingAddress LpaPath WhatACertificateProviderDoes LpaPath WhatHappensAfterNoFee LpaPath - WhatWasYourOriginalFee LpaPath + PreviousFee LpaPath WhenCanTheLpaBeUsed LpaPath WhichFeeTypeAreYouApplyingFor LpaPath WithdrawThisLpa LpaPath @@ -314,7 +315,7 @@ var Paths = AppPaths{ UseExistingAddress: "/use-existing-address", WhatACertificateProviderDoes: "/what-a-certificate-provider-does", WhatHappensAfterNoFee: "/what-happens-after-no-fee", - WhatWasYourOriginalFee: "/what-was-your-original-fee", + PreviousFee: "/how-much-did-you-previously-pay-for-your-lpa", WhenCanTheLpaBeUsed: "/when-can-the-lpa-be-used", WhichFeeTypeAreYouApplyingFor: "/which-fee-type-are-you-applying-for", WithdrawThisLpa: "/withdraw-this-lpa", @@ -329,4 +330,5 @@ 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 82af7b3e1d..7ce281217c 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -904,5 +904,12 @@ "whatIsYourPreviousReferenceNumberContent": "

Welsh

", "whereCanFindReferenceNumber": "Welsh", "whereCanFindReferenceNumberDetails": "

Welsh

", - "previousApplicationNumber": "Welsh" + "previousApplicationNumber": "Welsh", + "howMuchDidYouPreviouslyPayForYourLpa": "Welsh", + "toCalculateYourFeeForThisLpa": "Welsh", + "fullFee": "Welsh", + "halfFee": "Welsh", + "nothingExemption": "Welsh", + "nothingHardship": "Welsh", + "howMuchYouPreviouslyPaid": "Welsh" } diff --git a/lang/en.json b/lang/en.json index d18e5e3a44..3bd9ecac03 100644 --- a/lang/en.json +++ b/lang/en.json @@ -848,5 +848,12 @@ "whatIsYourPreviousReferenceNumberContent": "

You’ve told us that you recently made an LPA application.

We need your previous reference number so that we can match your old application to your new one.

", "whereCanFindReferenceNumber": "Where can I find my reference number?", "whereCanFindReferenceNumberDetails": "

Your reference number (also called ‘OPG reference number’ or ‘Our ref’) is on any letter you have from the Office of the Public Guardian.

It should also be on the cover letter we sent you when we sent your original application back to you.

", - "previousApplicationNumber": "Previous reference number" + "previousApplicationNumber": "Previous reference number", + "howMuchDidYouPreviouslyPayForYourLpa": "How much did you previously pay for your LPA?", + "toCalculateYourFeeForThisLpa": "To calculate your fee for this LPA, we need to know how much you paid when you submitted your last LPA application.", + "fullFee": "£82 (full fee)", + "halfFee": "£41 (half fee)", + "nothingExemption": "Nothing - I paid no fee because I got an exemption", + "nothingHardship": "Nothing - I paid no fee because I got a hardship fee waiver", + "howMuchYouPreviouslyPaid": "how much you previously paid" } diff --git a/web/template/previous_fee.gohtml b/web/template/previous_fee.gohtml new file mode 100644 index 0000000000..1e5f79cf81 --- /dev/null +++ b/web/template/previous_fee.gohtml @@ -0,0 +1,29 @@ +{{ template "page" . }} + +{{ define "pageTitle" }}{{ tr .App "howMuchDidYouPreviouslyPayForYourLpa" }}{{ end }} + +{{ define "main" }} +
+
+

{{ tr .App "howMuchDidYouPreviouslyPayForYourLpa" }}

+ +

{{ tr .App "toCalculateYourFeeForThisLpa" }}

+ +
+
+ {{ template "error-message" (errorMessage . "previous-fee") }} + + {{ template "radios" (items . "previous-fee" .Form.PreviousFee.String + (item .Options.PreviousFeeFull.String "fullFee") + (item .Options.PreviousFeeHalf.String "halfFee") + (item .Options.PreviousFeeExemption.String "nothingExemption") + (item .Options.PreviousFeeHardship.String "nothingHardship") + ) }} +
+ + {{ template "continue-and-return-buttons" . }} + {{ template "csrf-field" . }} +
+
+
+{{ end }}