Browse Source

Revert "refactor and rename copy variables"

This reverts commit 2d7eadef5a.
pull/3022/head
Carolyn 4 weeks ago
parent
commit
6aec49d68e
  1. 2
      app/models/form/sales/pages/estate_management_fee.rb
  2. 4
      app/models/form/sales/pages/leasehold_charges.rb
  3. 4
      app/models/form/sales/questions/has_leasehold_charges.rb
  4. 2
      app/models/form/sales/questions/has_management_fee.rb
  5. 4
      app/models/form/sales/questions/leasehold_charges.rb
  6. 2
      app/models/form/sales/questions/management_fee.rb
  7. 73
      config/locales/forms/2025/sales/sale_information.en.yml

2
app/models/form/sales/pages/estate_management_fee.rb

@ -1,7 +1,7 @@
class Form::Sales::Pages::EstateManagementFee < ::Form::Page class Form::Sales::Pages::EstateManagementFee < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@copy_key = "sales.sale_information.monthly_charges.shared_ownership.management_fee" @copy_key = "sales.sale_information.management_fee"
end end
def questions def questions

4
app/models/form/sales/pages/leasehold_charges.rb

@ -8,9 +8,9 @@ class Form::Sales::Pages::LeaseholdCharges < ::Form::Page
if form.start_year_2025_or_later? if form.start_year_2025_or_later?
case @ownershipsch case @ownershipsch
when 1 when 1
"sales.sale_information.monthly_charges.shared_ownership.service_charges" "sales.sale_information.leaseholdcharges.shared_ownership"
when 2 when 2
"sales.sale_information.monthly_charges.discounted_ownership.leasehold_charges" "sales.sale_information.leaseholdcharges.discounted_ownership"
end end
else else
"sales.sale_information.leaseholdcharges" "sales.sale_information.leaseholdcharges"

4
app/models/form/sales/questions/has_leasehold_charges.rb

@ -22,9 +22,9 @@ class Form::Sales::Questions::HasLeaseholdCharges < ::Form::Question
if form.start_year_2025_or_later? if form.start_year_2025_or_later?
case @ownershipsch case @ownershipsch
when 1 when 1
"sales.sale_information.monthly_charges.shared_ownership.service_charges.has_mscharge" "sales.sale_information.leaseholdcharges.shared_ownership.has_mscharge"
when 2 when 2
"sales.sale_information.monthly_charges.discounted_ownership.leasehold_charges.has_mscharge" "sales.sale_information.leaseholdcharges.discounted_ownership.has_mscharge"
end end
else else
"sales.sale_information.leaseholdcharges.has_mscharge" "sales.sale_information.leaseholdcharges.has_mscharge"

2
app/models/form/sales/questions/has_management_fee.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::HasManagementFee < ::Form::Question
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "has_management_fee" @id = "has_management_fee"
@copy_key = "sales.sale_information.monthly_charges.shared_ownership.management_fee.has_management_fee" @copy_key = "sales.sale_information.management_fee.has_management_fee"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@conditional_for = { @conditional_for = {

4
app/models/form/sales/questions/leasehold_charges.rb

@ -15,9 +15,9 @@ class Form::Sales::Questions::LeaseholdCharges < ::Form::Question
if form.start_year_2025_or_later? if form.start_year_2025_or_later?
case @ownershipsch case @ownershipsch
when 1 when 1
"sales.sale_information.monthly_charges.shared_ownership.service_charges.mscharge" "sales.sale_information.leaseholdcharges.shared_ownership.mscharge"
when 2 when 2
"sales.sale_information.monthly_charges.discounted_ownership.leasehold_charges.mscharge" "sales.sale_information.leaseholdcharges.discounted_ownership.mscharge"
end end
else else
"sales.sale_information.leaseholdcharges.mscharge" "sales.sale_information.leaseholdcharges.mscharge"

2
app/models/form/sales/questions/management_fee.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::ManagementFee < ::Form::Question
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "management_fee" @id = "management_fee"
@copy_key = "sales.sale_information.monthly_charges.shared_ownership.management_fee.management_fee" @copy_key = "sales.sale_information.management_fee.management_fee"
@type = "numeric" @type = "numeric"
@min = 1 @min = 1
@step = 0.01 @step = 0.01

73
config/locales/forms/2025/sales/sale_information.en.yml

@ -245,45 +245,31 @@ en:
hint_text: "Amount paid before any charges" hint_text: "Amount paid before any charges"
question_text: "What is the basic monthly rent after staircasing?" question_text: "What is the basic monthly rent after staircasing?"
monthly_charges: leaseholdcharges:
shared_ownership: shared_ownership:
service_charges: page_header: ""
page_header: "" has_mscharge:
has_mscharge: check_answer_label: "Property service charges"
check_answer_label: "Property service charges" check_answer_prompt: "Enter service charges if any"
check_answer_prompt: "Enter service charges if any" hint_text: "This includes any charges for day-to-day maintenance and repairs, building insurance, and any contributions to a sinking or reserved fund. It does not include estate management fees."
hint_text: "This includes any charges for day-to-day maintenance and repairs, building insurance, and any contributions to a sinking or reserved fund. It does not include estate management fees." question_text: "Does the property have any service charges?"
question_text: "Does the property have any service charges?" mscharge:
mscharge: check_answer_label: "Monthly leasehold charges"
check_answer_label: "Monthly leasehold charges" check_answer_prompt: ""
check_answer_prompt: "" hint_text: ""
hint_text: "" question_text: "Enter the total monthly charge"
question_text: "Enter the total monthly charge"
management_fee:
page_header: ""
has_management_fee:
check_answer_label: "Monthly estate management fee"
check_answer_prompt: "Tell us if the property has an estate management fee"
hint_text: "Estate management fees are typically used for the maintenance of communal gardens, payments, private roads, car parks and/or play areas within new build estates."
question_text: "Does the property have an estate management fee?"
management_fee:
check_answer_label: "Monthly estate management fee"
check_answer_prompt: ""
hint_text: ""
question_text: "Enter the total monthly management fee"
discounted_ownership: discounted_ownership:
leasehold_charges: page_header: ""
page_header: "" has_mscharge:
has_mscharge: check_answer_label: "Property leasehold charges"
check_answer_label: "Property leasehold charges" check_answer_prompt: "Enter leasehold charges if any"
check_answer_prompt: "Enter leasehold charges if any" hint_text: "For example, service and management charges"
hint_text: "For example, service and management charges" question_text: "Does the property have any monthly leasehold charges?"
question_text: "Does the property have any monthly leasehold charges?" mscharge:
mscharge: check_answer_label: "Monthly leasehold charges"
check_answer_label: "Monthly leasehold charges" check_answer_prompt: ""
check_answer_prompt: "" hint_text: ""
hint_text: "" question_text: "Enter the total monthly charge"
question_text: "Enter the total monthly charge"
purchase_price: purchase_price:
discounted_ownership: discounted_ownership:
@ -312,3 +298,16 @@ en:
check_answer_prompt: "" check_answer_prompt: ""
hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy" 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?" question_text: "What was the amount of any loan, grant, discount or subsidy given?"
management_fee:
page_header: ""
has_management_fee:
check_answer_label: "Monthly estate management fee"
check_answer_prompt: "Tell us if the property has an estate management fee"
hint_text: "Estate management fees are typically used for the maintenance of communal gardens, payments, private roads, car parks and/or play areas within new build estates."
question_text: "Does the property have an estate management fee?"
management_fee:
check_answer_label: "Monthly estate management fee"
check_answer_prompt: ""
hint_text: ""
question_text: "Enter the total monthly management fee"

Loading…
Cancel
Save