Browse Source
requires a little changing to question logic to account for if the conditional question is not visible right nowpull/3195/head
7 changed files with 45 additions and 6 deletions
@ -0,0 +1,16 @@ |
|||||||
|
class Form::Sales::Pages::MortgageLengthInterviewed < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection, ownershipsch:) |
||||||
|
super(id, hsh, subsection) |
||||||
|
@ownershipsch = ownershipsch |
||||||
|
@depends_on = [{ |
||||||
|
"mortgageused" => 1, "buyer_not_interviewed?" => false |
||||||
|
}] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::MortgageLengthKnown.new(nil, nil, self, ownershipsch: @ownershipsch), |
||||||
|
Form::Sales::Questions::MortgageLength.new(nil, nil, self, ownershipsch: @ownershipsch), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
||||||
@ -0,0 +1,15 @@ |
|||||||
|
class Form::Sales::Pages::MortgageLengthNotInterviewed < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection, ownershipsch:) |
||||||
|
super(id, hsh, subsection) |
||||||
|
@ownershipsch = ownershipsch |
||||||
|
@depends_on = [ |
||||||
|
{ "mortgageused" => 1, "buyer_not_interviewed?" => true }, |
||||||
|
] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::MortgageLength.new(nil, nil, self, ownershipsch: @ownershipsch), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
||||||
Loading…
Reference in new issue