Submit social housing lettings and sales data (CORE)
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.
 
 
 
 

17 lines
622 B

class Form::Lettings::Questions::La < ::Form::Question
def initialize(id, hsh, page)
super
@id = "la"
@type = "select"
@check_answers_card_number = nil
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
def answer_options
{ "" => "Select an option" }.merge(LocalAuthority.active(form.start_date).england.map { |la| [la.code, la.name] }.to_h)
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 13, 2024 => 14 }.freeze
end