4 changed files with 51 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||||
|
class Form::Sales::Pages::JointPurchase < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "joint_purchase" |
||||||
|
@header = "" |
||||||
|
@description = "" |
||||||
|
@subsection = subsection |
||||||
|
}] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::JointPurchase.new(nil, nil, self), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
||||||
|
|
@ -0,0 +1,18 @@ |
|||||||
|
class Form::Sales::Questions::JointPurchase < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "type" |
||||||
|
@check_answer_label = "Joint purchase" |
||||||
|
@header = "Is this a joint purchase?" |
||||||
|
@hint_text = "" |
||||||
|
@type = "radio" |
||||||
|
@answer_options = ANSWER_OPTIONS |
||||||
|
@page = page |
||||||
|
end |
||||||
|
|
||||||
|
ANSWER_OPTIONS = { |
||||||
|
"1" => { "value" => "Yes" }, |
||||||
|
"0" => { "value" => "No" }, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
@ -0,0 +1,15 @@ |
|||||||
|
class Form::Setup::Pages::CreatedBy < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "created_by" |
||||||
|
@header = "" |
||||||
|
@description = "" |
||||||
|
@subsection = subsection |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Setup::Questions::CreatedById.new(nil, nil, self), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue