11 changed files with 58 additions and 16 deletions
@ -0,0 +1,20 @@ |
|||||||
|
class Form::Sales::Pages::Person3Known < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "person_3_known" |
||||||
|
@header_partial = "person_3_known_page" |
||||||
|
@header = "" |
||||||
|
@description = "" |
||||||
|
@subsection = subsection |
||||||
|
@depends_on = [ |
||||||
|
{ "hholdcount" => 3 }, |
||||||
|
{ "hholdcount" => 4 }, |
||||||
|
] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::Person3Known.new(nil, nil, self), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
@ -1,9 +1,9 @@ |
|||||||
class Form::Sales::Questions::PersonXKnown < ::Form::Question |
class Form::Sales::Questions::Person2Known < ::Form::Question |
||||||
def initialize(id, hsh, page) |
def initialize(id, hsh, page) |
||||||
super |
super |
||||||
@id = "details_known_2" |
@id = "details_known_2" |
||||||
@check_answer_label = "Details known for person X" |
@check_answer_label = "Details known for person 2" |
||||||
@header = "Do you know the details for person X?" |
@header = "Do you know the details for person 2?" |
||||||
@type = "radio" |
@type = "radio" |
||||||
@answer_options = ANSWER_OPTIONS |
@answer_options = ANSWER_OPTIONS |
||||||
@page = page |
@page = page |
@ -0,0 +1,24 @@ |
|||||||
|
class Form::Sales::Questions::Person3Known < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "details_known_3" |
||||||
|
@check_answer_label = "Details known for person 3" |
||||||
|
@header = "Do you know the details for person 3?" |
||||||
|
@type = "radio" |
||||||
|
@answer_options = ANSWER_OPTIONS |
||||||
|
@page = page |
||||||
|
@hint_text = "" |
||||||
|
@hidden_in_check_answers = { |
||||||
|
"depends_on" => [ |
||||||
|
{ |
||||||
|
"details_known_3" => 1, |
||||||
|
}, |
||||||
|
], |
||||||
|
} |
||||||
|
end |
||||||
|
|
||||||
|
ANSWER_OPTIONS = { |
||||||
|
"1" => { "value" => "Yes" }, |
||||||
|
"2" => { "value" => "No" }, |
||||||
|
}.freeze |
||||||
|
end |
@ -0,0 +1 @@ |
|||||||
|
You have given us the details for 1 of the <%= hholdcount %> other people in the household |
@ -0,0 +1 @@ |
|||||||
|
You have given us the details for 2 of the <%= hholdcount %> other people in the household |
@ -1 +0,0 @@ |
|||||||
You have given us the details for X of the <%= hholdcount %> other people in the household |
|
Loading…
Reference in new issue