13 changed files with 130 additions and 40 deletions
@ -1,12 +1,20 @@
|
||||
class Form::Sales::Pages::BuyerInterview < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "buyer_interview" |
||||
def initialize(id, hsh, subsection, joint_purchase:) |
||||
super(id, hsh, subsection) |
||||
@joint_purchase = joint_purchase |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::BuyerInterview.new(nil, nil, self), |
||||
Form::Sales::Questions::BuyerInterview.new(nil, nil, self, joint_purchase: @joint_purchase), |
||||
] |
||||
end |
||||
|
||||
def depends_on |
||||
if @joint_purchase |
||||
[{ "joint_purchase?" => true }] |
||||
else |
||||
[{ "not_joint_purchase?" => true }] |
||||
end |
||||
end |
||||
end |
||||
|
||||
@ -1,13 +1,21 @@
|
||||
class Form::Sales::Pages::PrivacyNotice < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "privacy_notice" |
||||
def initialize(id, hsh, subsection, joint_purchase:) |
||||
super(id, hsh, subsection) |
||||
@header = "Department for Levelling Up, Housing and Communities privacy notice" |
||||
@joint_purchase = joint_purchase |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::PrivacyNotice.new(nil, nil, self), |
||||
Form::Sales::Questions::PrivacyNotice.new(nil, nil, self, joint_purchase: @joint_purchase), |
||||
] |
||||
end |
||||
|
||||
def depends_on |
||||
if @joint_purchase |
||||
[{ "joint_purchase?" => true }] |
||||
else |
||||
[{ "not_joint_purchase?" => true }] |
||||
end |
||||
end |
||||
end |
||||
|
||||
Loading…
Reference in new issue