Browse Source

CLDC-2439: Informative removed, check pages fixed.

pull/1718/head
Aaron Spencer 3 years ago
parent
commit
885bd91062
  1. 10
      app/models/form/lettings/pages/max_rent_value_check.rb
  2. 8
      app/models/form/lettings/pages/min_rent_value_check.rb
  3. 4
      app/models/form/lettings/questions/max_rent_value_check.rb
  4. 4
      app/models/form/lettings/questions/min_rent_value_check.rb
  5. 2
      config/locales/en.yml

10
app/models/form/lettings/pages/max_rent_value_check.rb

@ -12,16 +12,6 @@ class Form::Lettings::Pages::MaxRentValueCheck < ::Form::Page
}, },
], ],
} }
@informative_text = {
"translation" => "soft_validations.rent.max_hint_text",
"arguments" => [
{
"key" => "field_formatted_as_currency",
"arguments_for_key" => "soft_max_for_period",
"i18n_template" => "soft_max_for_period",
},
],
}
@check_answers_card_number = check_answers_card_number @check_answers_card_number = check_answers_card_number
end end

8
app/models/form/lettings/pages/min_rent_value_check.rb

@ -10,14 +10,6 @@ class Form::Lettings::Pages::MinRentValueCheck < ::Form::Page
"i18n_template" => "brent", "i18n_template" => "brent",
}], }],
} }
@informative_text = {
"translation" => "soft_validations.rent.min_hint_text",
"arguments" => [{
"key" => "field_formatted_as_currency",
"arguments_for_key" => "soft_min_for_period",
"i18n_template" => "soft_min_for_period",
}],
}
@check_answers_card_number = check_answers_card_number @check_answers_card_number = check_answers_card_number
end end

4
app/models/form/lettings/questions/max_rent_value_check.rb

@ -1,14 +1,14 @@
class Form::Lettings::Questions::MaxRentValueCheck < ::Form::Question class Form::Lettings::Questions::MaxRentValueCheck < ::Form::Question
def initialize(id, hsh, page, check_answers_card_number:) def initialize(id, hsh, page, check_answers_card_number:)
super(id, hsh, page) super(id, hsh, page)
@id = "max_rent_value_check" @id = "rent_value_check"
@check_answer_label = "Total rent confirmation" @check_answer_label = "Total rent confirmation"
@header = "Are you sure this is correct?" @header = "Are you sure this is correct?"
@type = "interruption_screen" @type = "interruption_screen"
@hint_text = hint_text @hint_text = hint_text
@check_answers_card_number = check_answers_card_number @check_answers_card_number = check_answers_card_number
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = { "depends_on" => [{ "max_rent_value_check" => 0 }, { "max_rent_value_check" => 1 }] } @hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] }
end end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze

4
app/models/form/lettings/questions/min_rent_value_check.rb

@ -1,14 +1,14 @@
class Form::Lettings::Questions::MinRentValueCheck < ::Form::Question class Form::Lettings::Questions::MinRentValueCheck < ::Form::Question
def initialize(id, hsh, page, check_answers_card_number:) def initialize(id, hsh, page, check_answers_card_number:)
super(id, hsh, page) super(id, hsh, page)
@id = "min_rent_value_check" @id = "rent_value_check"
@check_answer_label = "Total rent confirmation" @check_answer_label = "Total rent confirmation"
@header = "Are you sure this is correct?" @header = "Are you sure this is correct?"
@type = "interruption_screen" @type = "interruption_screen"
@hint_text = hint_text @hint_text = hint_text
@check_answers_card_number = check_answers_card_number @check_answers_card_number = check_answers_card_number
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = { "depends_on" => [{ "min_rent_value_check" => 0 }, { "min_rent_value_check" => 1 }] } @hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] }
end end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze

2
config/locales/en.yml

@ -595,8 +595,6 @@ en:
over_soft_max_for_la_combined: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?" over_soft_max_for_la_combined: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?"
rent: rent:
outside_range_title: "You told us the rent is %{brent}" outside_range_title: "You told us the rent is %{brent}"
min_hint_text: "The minimum rent expected for this type of property in this local authority is %{soft_min_for_period}."
max_hint_text: "The maximum rent expected for this type of property in this local authority is %{soft_max_for_period}."
purchase_price: purchase_price:
title_text: "You told us the purchase price is %{value}" title_text: "You told us the purchase price is %{value}"
hint_text: "This is %{higher_or_lower} than we would expect" hint_text: "This is %{higher_or_lower} than we would expect"

Loading…
Cancel
Save