Submit social housing lettings and sales data (CORE)

30 lines
1.2 KiB

class Form::Sales::Questions::GenderIdentity1 < ::Form::Question
def initialize(id, hsh, page)
super
@id = "sex1"
@check_answer_label = "Buyer 1’s gender identity"
@header = "Which of these best describes buyer 1’s gender identity?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
"F" => { "value" => "Female" },
"M" => { "value" => "Male" },
"X" => { "value" => "Non-binary" },
"R" => { "value" => "Prefers not to say" },
}.freeze
def hint_text
if form.start_year_after_2024?
"This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
else
"Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest."
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 21, 2024 => 23 }.freeze
end