Browse Source

CLDC-4177: Create new sex-at-birth question

CLDC-4177-sales-sab-question
Katherine Langford 2 weeks ago
parent
commit
6a1f828db1
  1. 21
      app/models/form/sales/questions/sex_registered_at_birth1.rb

21
app/models/form/sales/questions/sex_registered_at_birth1.rb

@ -0,0 +1,21 @@
# frozen_string_literal: true
class Form::Sales::Questions::SexRegisteredAtBirth1 < Form::Question
def initialize(id, hsh, page)
super
@id = "sexRAB1"
@type = "radio"
@check_answers_card_number = 1
@answer_options = ANSWER_OPTIONS
@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" },
"divider" => { "value" => true },
"R" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2026 => 32 }.freeze
end
Loading…
Cancel
Save