diff --git a/app/models/form/lettings/pages/starter_tenancy_type.rb b/app/models/form/lettings/pages/starter_tenancy_type.rb index 5e12d8a6e..063b66c6f 100644 --- a/app/models/form/lettings/pages/starter_tenancy_type.rb +++ b/app/models/form/lettings/pages/starter_tenancy_type.rb @@ -8,6 +8,6 @@ class Form::Lettings::Pages::StarterTenancyType < ::Form::Page end def questions - @questions ||= [Form::Lettings::Questions::Tenancy.new(nil, nil, self), Form::Lettings::Questions::Tenancyother.new(nil, nil, self)] + @questions ||= [Form::Lettings::Questions::StarterTenancy.new(nil, nil, self), Form::Lettings::Questions::Tenancyother.new(nil, nil, self)] end end diff --git a/app/models/form/lettings/questions/starter_tenancy.rb b/app/models/form/lettings/questions/starter_tenancy.rb new file mode 100644 index 000000000..6527b9ddd --- /dev/null +++ b/app/models/form/lettings/questions/starter_tenancy.rb @@ -0,0 +1,20 @@ +class Form::Lettings::Questions::StarterTenancy < ::Form::Question + def initialize(id, hsh, page) + super + @id = "tenancy" + @check_answer_label = "Type of main tenancy after the starter period has ended?" + @header = "What is the type of tenancy after the starter period has ended?" + @type = "radio" + @check_answers_card_number = 0 + @hint_text = "This is also known as an ‘introductory period’." + @answer_options = ANSWER_OPTIONS + @conditional_for = { "tenancyother" => [3] } + end + + ANSWER_OPTIONS = { "4" => { "value" => "Assured Shorthold Tenancy (AST) – Fixed term" }, + "6" => { "value" => "Secure – fixed term" }, + "2" => { "value" => "Assured – lifetime" }, + "7" => { "value" => "Secure – lifetime" }, + "5" => { "value" => "Licence agreement" }, + "3" => { "value" => "Other" } }.freeze +end diff --git a/app/models/form/lettings/questions/tenancy.rb b/app/models/form/lettings/questions/tenancy.rb index 0b5d50c0d..9ad0a1c21 100644 --- a/app/models/form/lettings/questions/tenancy.rb +++ b/app/models/form/lettings/questions/tenancy.rb @@ -2,14 +2,19 @@ class Form::Lettings::Questions::Tenancy < ::Form::Question def initialize(id, hsh, page) super @id = "tenancy" - @check_answer_label = "Type of main tenancy after the starter period has ended?" - @header = "What is the type of tenancy after the starter period has ended?" + @check_answer_label = "Type of main tenancy" + @header = "What is the type of tenancy?" @type = "radio" @check_answers_card_number = 0 - @hint_text = "This is also known as an ‘introductory period’." + @hint_text = "" @answer_options = ANSWER_OPTIONS @conditional_for = { "tenancyother" => [3] } end - ANSWER_OPTIONS = { "4" => { "value" => "Assured Shorthold Tenancy (AST) – Fixed term" }, "6" => { "value" => "Secure – fixed term" }, "2" => { "value" => "Assured – lifetime" }, "7" => { "value" => "Secure – lifetime" }, "5" => { "value" => "Licence agreement" }, "3" => { "value" => "Other" } }.freeze + ANSWER_OPTIONS = { "4" => { "value" => "Assured Shorthold Tenancy (AST) – Fixed term" }, + "6" => { "value" => "Secure – fixed term" }, + "2" => { "value" => "Assured – lifetime" }, + "7" => { "value" => "Secure – lifetime" }, + "5" => { "value" => "Licence agreement" }, + "3" => { "value" => "Other" } }.freeze end