392 changed files with 3295 additions and 1708 deletions
@ -1,24 +0,0 @@
|
||||
class Form::Lettings::Pages::MaxRentValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, check_answers_card_number: nil) |
||||
super(id, hsh, subsection) |
||||
@depends_on = [{ "rent_in_soft_max_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.rent.outside_range_title", |
||||
"arguments" => [{ |
||||
"key" => "brent", |
||||
"label" => true, |
||||
"i18n_template" => "brent", |
||||
}], |
||||
} |
||||
@informative_text = I18n.t("soft_validations.rent.informative_text", higher_or_lower: "higher") |
||||
@check_answers_card_number = check_answers_card_number |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::MaxRentValueCheck.new(nil, nil, self, check_answers_card_number: @check_answers_card_number)] |
||||
end |
||||
|
||||
def interruption_screen_question_ids |
||||
%w[brent period startdate uprn postcode_full la beds rent_type needstype] |
||||
end |
||||
end |
@ -1,24 +0,0 @@
|
||||
class Form::Lettings::Pages::MinRentValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, check_answers_card_number: nil) |
||||
super(id, hsh, subsection) |
||||
@depends_on = [{ "rent_in_soft_min_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.rent.outside_range_title", |
||||
"arguments" => [{ |
||||
"key" => "brent", |
||||
"label" => true, |
||||
"i18n_template" => "brent", |
||||
}], |
||||
} |
||||
@informative_text = I18n.t("soft_validations.rent.informative_text", higher_or_lower: "lower") |
||||
@check_answers_card_number = check_answers_card_number |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::MinRentValueCheck.new(nil, nil, self, check_answers_card_number: @check_answers_card_number)] |
||||
end |
||||
|
||||
def interruption_screen_question_ids |
||||
%w[brent period startdate uprn postcode_full la beds rent_type needstype] |
||||
end |
||||
end |
@ -1,14 +0,0 @@
|
||||
class Form::Lettings::Pages::PropertyPostcode < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_postcode" |
||||
@depends_on = [{ "is_general_needs?" => true }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::PostcodeKnown.new(nil, nil, self), |
||||
Form::Lettings::Questions::PostcodeFull.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,35 @@
|
||||
class Form::Lettings::Pages::RentValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, check_answers_card_number: nil) |
||||
super(id, hsh, subsection) |
||||
@depends_on = [{ "rent_soft_validation_triggered?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.rent.outside_range_title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "brent", |
||||
"label" => true, |
||||
"i18n_template" => "brent", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.rent.informative_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "rent_soft_validation_higher_or_lower_text", |
||||
"label" => false, |
||||
"i18n_template" => "higher_or_lower", |
||||
}, |
||||
], |
||||
} |
||||
@check_answers_card_number = check_answers_card_number |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::RentValueCheck.new(nil, nil, self, check_answers_card_number: @check_answers_card_number)] |
||||
end |
||||
|
||||
def interruption_screen_question_ids |
||||
%w[brent period startdate uprn postcode_full la beds rent_type needstype] |
||||
end |
||||
end |
@ -1,15 +0,0 @@
|
||||
class Form::Lettings::Questions::MaxRentValueCheck < ::Form::Question |
||||
def initialize(id, hsh, page, check_answers_card_number:) |
||||
super(id, hsh, page) |
||||
@id = "rent_value_check" |
||||
@check_answer_label = "Total rent confirmation" |
||||
@header = "Are you sure this is correct?" |
||||
@type = "interruption_screen" |
||||
@hint_text = I18n.t("soft_validations.rent.hint_text", higher_or_lower: "higher") |
||||
@check_answers_card_number = check_answers_card_number |
||||
@answer_options = ANSWER_OPTIONS |
||||
@hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] } |
||||
end |
||||
|
||||
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze |
||||
end |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue