Browse Source

feat: update text, remove separate redundant function, add value check page everywhere

pull/1201/head
natdeanlewissoftwire 3 years ago
parent
commit
882a27bfd7
  1. 2
      app/models/form/sales/pages/extra_borrowing_value_check.rb
  2. 2
      app/models/form/sales/questions/extra_borrowing_value_check.rb
  3. 3
      app/models/form/sales/subsections/discounted_ownership_scheme.rb
  4. 4
      app/models/validations/sales/household_validations.rb
  5. 3
      config/locales/en.yml

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

@ -10,8 +10,6 @@ class Form::Sales::Pages::ExtraBorrowingValueCheck < Form::Page
"translation" => "soft_validations.extra_borrowing.title", "translation" => "soft_validations.extra_borrowing.title",
} }
@informative_text = { @informative_text = {
"translation" => "soft_validations.extra_borrowing.hint_text",
"arguments" => [],
} }
end end

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

@ -18,6 +18,6 @@ class Form::Sales::Questions::ExtraBorrowingValueCheck < ::Form::Question
}, },
], ],
} }
@header = "Are you sure this there is no extra borrowing?" @header = "Are you sure there is no extra borrowing?"
end end
end end

3
app/models/form/sales/subsections/discounted_ownership_scheme.rb

@ -10,16 +10,19 @@ class Form::Sales::Subsections::DiscountedOwnershipScheme < ::Form::Subsection
@pages ||= [ @pages ||= [
Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_discounted_ownership", nil, self), Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_discounted_ownership", nil, self),
Form::Sales::Pages::AboutPriceRtb.new(nil, nil, self), Form::Sales::Pages::AboutPriceRtb.new(nil, nil, self),
Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self),
Form::Sales::Pages::AboutPriceNotRtb.new(nil, nil, self), Form::Sales::Pages::AboutPriceNotRtb.new(nil, nil, self),
Form::Sales::Pages::PurchasePrice.new("purchase_price_discounted_ownership", nil, self), Form::Sales::Pages::PurchasePrice.new("purchase_price_discounted_ownership", nil, self),
Form::Sales::Pages::Mortgageused.new("mortgage_used_discounted_ownership", nil, self), Form::Sales::Pages::Mortgageused.new("mortgage_used_discounted_ownership", nil, self),
Form::Sales::Pages::MortgageAmount.new("mortgage_amount_discounted_ownership", nil, self), Form::Sales::Pages::MortgageAmount.new("mortgage_amount_discounted_ownership", nil, self),
Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self),
Form::Sales::Pages::MortgageLender.new("mortgage_lender_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLender.new("mortgage_lender_discounted_ownership", nil, self),
Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_discounted_ownership", nil, self),
Form::Sales::Pages::MortgageLength.new("mortgage_length_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLength.new("mortgage_length_discounted_ownership", nil, self),
Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_discounted_ownership", nil, self), Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_discounted_ownership", nil, self),
Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self), Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self),
Form::Sales::Pages::AboutDepositWithoutDiscount.new("about_deposit_discounted_ownership", nil, self), Form::Sales::Pages::AboutDepositWithoutDiscount.new("about_deposit_discounted_ownership", nil, self),
Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self),
Form::Sales::Pages::DepositValueCheck.new("discounted_ownership_deposit_value_check", nil, self), Form::Sales::Pages::DepositValueCheck.new("discounted_ownership_deposit_value_check", nil, self),
Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_discounted_ownership", nil, self), Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_discounted_ownership", nil, self),
] ]

4
app/models/validations/sales/household_validations.rb

@ -54,10 +54,6 @@ private
economic_status == 7 economic_status == 7
end end
def person_economic_status_refused?(economic_status)
economic_status == 10
end
def person_is_child?(relationship) def person_is_child?(relationship)
relationship == "C" relationship == "C"
end end

3
config/locales/en.yml

@ -418,8 +418,7 @@ en:
title: "You told us this person is %{age} or over and not retired" title: "You told us this person is %{age} or over and not retired"
hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." hint_text: "The minimum expected retirement age for %{gender} in England is %{age}."
extra_borrowing: extra_borrowing:
title: "You told us this doesn't include any extra borrowing" title: "The mortgage and deposit are higher than the purchase minus the discount"
hint_text: "The mortgage and deposit are higher than the purchase minus the discount"
pregnancy: pregnancy:
title: "You told us somebody in the household is pregnant" title: "You told us somebody in the household is pregnant"
no_females: "You also told us there are no female tenants living at the property." no_females: "You also told us there are no female tenants living at the property."

Loading…
Cancel
Save