Browse Source

Backfill repeating voiddate

pull/1254/head
Kat 3 years ago
parent
commit
7b7c763d1d
  1. 2
      app/models/form/lettings/pages/new_build_handover_date.rb
  2. 6
      app/models/form/lettings/questions/voiddate.rb
  3. 11
      app/models/form/lettings/questions/voiddate_new_build.rb

2
app/models/form/lettings/pages/new_build_handover_date.rb

@ -8,6 +8,6 @@ class Form::Lettings::Pages::NewBuildHandoverDate < ::Form::Page
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::Voiddate.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::VoiddateNewBuild.new(nil, nil, self)]
end end
end end

6
app/models/form/lettings/questions/voiddate.rb

@ -2,10 +2,10 @@ class Form::Lettings::Questions::Voiddate < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "voiddate" @id = "voiddate"
@check_answer_label = "New-build handover date" @check_answer_label = "Void or renewal date"
@header = "What is the new-build handover date?" @header = "What is the void or renewal date?"
@type = "date" @type = "date"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = "For example, 27 3 2021."
end end
end end

11
app/models/form/lettings/questions/voiddate_new_build.rb

@ -0,0 +1,11 @@
class Form::Lettings::Questions::VoiddateNewBuild < ::Form::Question
def initialize(id, hsh, page)
super
@id = "voiddate"
@check_answer_label = "New-build handover date"
@header = "What is the new-build handover date?"
@type = "date"
@check_answers_card_number = 0
@hint_text = ""
end
end
Loading…
Cancel
Save