From acff8c31dee3d177dfb0d95e0254dfded2874e34 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:42:27 +0000 Subject: [PATCH] Fixes --- app/models/form/sales/questions/equity.rb | 2 +- app/models/form/sales/questions/value.rb | 2 +- config/locales/forms/2023/sales/sale_information.en.yml | 4 ++-- config/locales/forms/2024/sales/sale_information.en.yml | 4 ++-- config/locales/forms/2025/sales/sale_information.en.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/form/sales/questions/equity.rb b/app/models/form/sales/questions/equity.rb index e39e77ebb..74f5e9970 100644 --- a/app/models/form/sales/questions/equity.rb +++ b/app/models/form/sales/questions/equity.rb @@ -2,7 +2,7 @@ class Form::Sales::Questions::Equity < ::Form::Question def initialize(id, hsh, page) super @id = "equity" - @copy_key = "sales.sale_information.equity.#{page.id}" + @copy_key = form.start_year_2025_or_later? ? "sales.sale_information.equity.#{page.id}" : "sales.sale_information.equity" @type = "numeric" @min = 0 @max = 100 diff --git a/app/models/form/sales/questions/value.rb b/app/models/form/sales/questions/value.rb index ad021e920..ce8d07e28 100644 --- a/app/models/form/sales/questions/value.rb +++ b/app/models/form/sales/questions/value.rb @@ -2,7 +2,7 @@ class Form::Sales::Questions::Value < ::Form::Question def initialize(id, hsh, page) super @id = "value" - @copy_key = "sales.sale_information.value.#{page.id}" + @copy_key = form.start_year_2025_or_later? ? "sales.sale_information.value.#{page.id}" : "sales.sale_information.value" @type = "numeric" @min = 0 @step = 1 diff --git a/config/locales/forms/2023/sales/sale_information.en.yml b/config/locales/forms/2023/sales/sale_information.en.yml index 89e232bd2..24f767026 100644 --- a/config/locales/forms/2023/sales/sale_information.en.yml +++ b/config/locales/forms/2023/sales/sale_information.en.yml @@ -113,7 +113,7 @@ en: question_text: "What was the initial percentage equity stake purchased?" mortgageused: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage used" hint_text: "" question_text: "Was a mortgage used for the purchase of this property?" @@ -205,4 +205,4 @@ en: check_answer_label: "Amount of any loan, grant or subsidy" hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy" question_text: "What was the amount of any loan, grant, discount or subsidy given?" - + diff --git a/config/locales/forms/2024/sales/sale_information.en.yml b/config/locales/forms/2024/sales/sale_information.en.yml index 17355d774..92acca9cd 100644 --- a/config/locales/forms/2024/sales/sale_information.en.yml +++ b/config/locales/forms/2024/sales/sale_information.en.yml @@ -117,7 +117,7 @@ en: question_text: "What was the initial percentage equity stake purchased?" mortgageused: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage used" hint_text: "" question_text: "Was a mortgage used for the purchase of this property?" @@ -204,4 +204,4 @@ en: check_answer_label: "Amount of any loan, grant or subsidy" hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy" question_text: "What was the amount of any loan, grant, discount or subsidy given?" - + diff --git a/config/locales/forms/2025/sales/sale_information.en.yml b/config/locales/forms/2025/sales/sale_information.en.yml index 573c56618..278c8a235 100644 --- a/config/locales/forms/2025/sales/sale_information.en.yml +++ b/config/locales/forms/2025/sales/sale_information.en.yml @@ -145,7 +145,7 @@ en: question_text: "What was the percentage shared purchased in the initial transaction?" mortgageused: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage used?" hint_text: "" question_text: "Was a mortgage used for the purchase of this property?"