5 changed files with 101 additions and 0 deletions
@ -0,0 +1,17 @@
|
||||
class Form::Sales::Pages::DepositAndMortgageValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@depends_on = [ |
||||
{ |
||||
"mortgage_plus_deposit_less_than_discounted_value?" => true, |
||||
}, |
||||
] |
||||
@informative_text = {} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::DepositAndMortgageValueCheck.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
||||
@ -0,0 +1,23 @@
|
||||
class Form::Sales::Questions::DepositAndMortgageValueCheck < ::Form::Question |
||||
def initialize(id, hsh, page) |
||||
super |
||||
@id = "deposit_and_mortgage_value_check" |
||||
@check_answer_label = "Deposit and mortgage against discount confirmation" # is this meant to come from somewhere or do I just write something sensible? |
||||
@header = "Are you sure? Mortgage and deposit usually equal or are more than (value - discount)" |
||||
@type = "interruption_screen" |
||||
@answer_options = { |
||||
"0" => { "value" => "Yes" }, |
||||
"1" => { "value" => "No" }, |
||||
} |
||||
@hidden_in_check_answers = { |
||||
"depends_on" => [ |
||||
{ |
||||
"deposit_and_mortgage_value_check" => 0, |
||||
}, |
||||
{ |
||||
"deposit_and_mortgage_value_check" => 1, |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
end |
||||
Loading…
Reference in new issue