You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
932 B
40 lines
932 B
2 years ago
|
class Form::Sales::Questions::HasLeaseholdCharges < ::Form::Question
|
||
2 years ago
|
def initialize(id, hsh, subsection, ownershipsch:)
|
||
|
super(id, hsh, subsection)
|
||
2 years ago
|
@id = "has_mscharge"
|
||
|
@check_answer_label = "Does the property have any monthly leasehold charges?"
|
||
|
@header = "Does the property have any monthly leasehold charges?"
|
||
2 years ago
|
@hint_text = "For example, service and management charges"
|
||
|
@type = "radio"
|
||
|
@answer_options = ANSWER_OPTIONS
|
||
|
@conditional_for = {
|
||
|
"mscharge" => [1],
|
||
|
}
|
||
|
@hidden_in_check_answers = {
|
||
|
"depends_on" => [
|
||
|
{
|
||
2 years ago
|
"has_mscharge" => 1,
|
||
2 years ago
|
},
|
||
|
],
|
||
|
}
|
||
2 years ago
|
@ownershipsch = ownershipsch
|
||
|
@question_number = question_number
|
||
2 years ago
|
end
|
||
|
|
||
|
ANSWER_OPTIONS = {
|
||
|
"1" => { "value" => "Yes" },
|
||
|
"0" => { "value" => "No" },
|
||
|
}.freeze
|
||
2 years ago
|
|
||
|
def question_number
|
||
|
case @ownershipsch
|
||
|
when 1
|
||
|
98
|
||
|
when 2
|
||
|
109
|
||
|
when 3
|
||
|
117
|
||
|
end
|
||
|
end
|
||
2 years ago
|
end
|