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.
24 lines
1008 B
24 lines
1008 B
class Form::Lettings::Questions::Declaration < ::Form::Question |
|
def initialize(id, hsh, page) |
|
super |
|
@id = "declaration" |
|
@check_answer_label = "Tenant has seen the privacy notice" |
|
@header = "Declaration" |
|
@type = "checkbox" |
|
@check_answers_card_number = 0 unless form.start_year_after_2024? |
|
@top_guidance_partial = form.start_year_after_2024? ? "privacy_notice_tenant_2024" : "privacy_notice_tenant" |
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
|
end |
|
|
|
def answer_options |
|
declaration_text = if form.start_year_after_2024? |
|
"The tenant has seen or been given access to the DLUHC privacy notice" |
|
else |
|
"The tenant has seen the DLUHC privacy notice" |
|
end |
|
|
|
{ "declaration" => { "value" => declaration_text } }.freeze |
|
end |
|
|
|
QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11 }.freeze |
|
end
|
|
|