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