Browse Source

Merge branch 'main' into AddPaperTrailToBulkUploadObject

pull/2745/head
Rachael Booth 1 year ago committed by GitHub
parent
commit
af5cd9dcfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/lettings/pages/address.rb
  2. 2
      app/models/form/lettings/pages/address_fallback.rb
  3. 2
      app/models/form/lettings/pages/address_matcher.rb
  4. 1
      app/models/form/lettings/pages/previous_housing_situation.rb
  5. 1
      app/models/form/lettings/pages/previous_housing_situation_renewal.rb
  6. 1
      app/models/form/lettings/pages/previous_local_authority.rb
  7. 1
      app/models/form/lettings/pages/previous_postcode.rb
  8. 1
      app/models/form/lettings/pages/property_major_repairs.rb
  9. 1
      app/models/form/lettings/pages/reason_for_leaving_last_settled_home.rb
  10. 1
      app/models/form/lettings/pages/reason_for_leaving_last_settled_home_renewal.rb
  11. 1
      app/models/form/lettings/pages/referral.rb
  12. 1
      app/models/form/lettings/pages/referral_prp.rb
  13. 1
      app/models/form/lettings/pages/referral_supported_housing.rb
  14. 1
      app/models/form/lettings/pages/referral_supported_housing_prp.rb
  15. 1
      app/models/form/lettings/pages/uprn.rb
  16. 1
      app/models/form/lettings/pages/uprn_selection.rb
  17. 1
      app/models/form/lettings/pages/void_date.rb
  18. 3
      app/models/form/lettings/questions/address_line1.rb
  19. 3
      app/models/form/lettings/questions/address_line1_for_address_matcher.rb
  20. 2
      app/models/form/lettings/questions/address_line2.rb
  21. 6
      app/models/form/lettings/questions/beds.rb
  22. 3
      app/models/form/lettings/questions/builtype.rb
  23. 3
      app/models/form/lettings/questions/county.rb
  24. 2
      app/models/form/lettings/questions/declaration.rb
  25. 3
      app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
  26. 3
      app/models/form/lettings/questions/homeless.rb
  27. 2
      app/models/form/lettings/questions/la.rb
  28. 3
      app/models/form/lettings/questions/layear.rb
  29. 3
      app/models/form/lettings/questions/letting_allocation.rb
  30. 4
      app/models/form/lettings/questions/majorrepairs.rb
  31. 3
      app/models/form/lettings/questions/mrcdate.rb
  32. 2
      app/models/form/lettings/questions/offered.rb
  33. 2
      app/models/form/lettings/questions/postcode_for_address_matcher.rb
  34. 3
      app/models/form/lettings/questions/postcode_for_full_address.rb
  35. 4
      app/models/form/lettings/questions/ppcodenk.rb
  36. 4
      app/models/form/lettings/questions/ppostcode_full.rb
  37. 4
      app/models/form/lettings/questions/previous_la_known.rb
  38. 3
      app/models/form/lettings/questions/previous_let_type.rb
  39. 4
      app/models/form/lettings/questions/previous_tenure.rb
  40. 5
      app/models/form/lettings/questions/previous_tenure_renewal.rb
  41. 4
      app/models/form/lettings/questions/prevloc.rb
  42. 4
      app/models/form/lettings/questions/reason.rb
  43. 4
      app/models/form/lettings/questions/reason_renewal.rb
  44. 3
      app/models/form/lettings/questions/reasonable_preference_reason.rb
  45. 4
      app/models/form/lettings/questions/reasonother.rb
  46. 3
      app/models/form/lettings/questions/reasonpref.rb
  47. 4
      app/models/form/lettings/questions/referral.rb
  48. 4
      app/models/form/lettings/questions/referral_prp.rb
  49. 4
      app/models/form/lettings/questions/referral_supported_housing.rb
  50. 4
      app/models/form/lettings/questions/referral_supported_housing_prp.rb
  51. 2
      app/models/form/lettings/questions/rent_type.rb
  52. 3
      app/models/form/lettings/questions/rsnvac.rb
  53. 3
      app/models/form/lettings/questions/rsnvac_first_let.rb
  54. 3
      app/models/form/lettings/questions/town_or_city.rb
  55. 3
      app/models/form/lettings/questions/unittype_gn.rb
  56. 3
      app/models/form/lettings/questions/uprn.rb
  57. 6
      app/models/form/lettings/questions/uprn_known.rb
  58. 2
      app/models/form/lettings/questions/uprn_selection.rb
  59. 2
      app/models/form/lettings/questions/voiddate.rb
  60. 3
      app/models/form/lettings/questions/waityear.rb
  61. 3
      app/models/form/lettings/questions/wheelchair.rb
  62. 2
      app/models/form/lettings/subsections/property_information.rb
  63. 6
      app/models/form/sales/questions/privacy_notice.rb
  64. 10
      app/models/form/sales/questions/shared_ownership_type.rb
  65. 11
      app/models/forms/bulk_upload_lettings/upload_your_file.rb
  66. 11
      app/models/forms/bulk_upload_sales/upload_your_file.rb
  67. 22
      app/models/validations/date_validations.rb
  68. 80
      app/models/validations/setup_validations.rb
  69. 28
      app/views/form/guidance/_discounted_ownership_type_definitions.erb
  70. 10
      app/views/form/guidance/_finding_location.erb
  71. 13
      app/views/form/guidance/_finding_scheme.erb
  72. 8
      app/views/form/guidance/_mortgage_lender.html.erb
  73. 13
      app/views/form/guidance/_outright_sale_type_definitions.erb
  74. 4
      app/views/form/guidance/_privacy_notice_buyer.erb
  75. 1
      app/views/form/guidance/_privacy_notice_buyer_2024.erb
  76. 1
      app/views/form/guidance/_privacy_notice_buyer_2024_joint_purchase.erb
  77. 4
      app/views/form/guidance/_privacy_notice_buyer_joint_purchase.erb
  78. 4
      app/views/form/guidance/_privacy_notice_tenant.erb
  79. 1
      app/views/form/guidance/_privacy_notice_tenant_2024.erb
  80. 26
      app/views/form/guidance/_rent_type_definitions.erb
  81. 21
      app/views/form/guidance/_rent_type_definitions_2024.erb
  82. 4
      app/views/form/guidance/_scheme_selection.html.erb
  83. 31
      app/views/form/guidance/_shared_ownership_type_definitions.erb
  84. 26
      app/views/form/guidance/_shared_ownership_type_definitions_2024.erb
  85. 14
      app/views/form/guidance/_void_date.html.erb
  86. 21
      app/views/form/guidance/_what_counts_as_income.html.erb
  87. 52
      config/locales/en.yml
  88. 63
      config/locales/forms/2023/lettings/guidance.en.yml
  89. 120
      config/locales/forms/2023/lettings/household_situation.en.yml
  90. 104
      config/locales/forms/2023/lettings/property_information.en.yml
  91. 47
      config/locales/forms/2023/sales/guidance.en.yml
  92. 7
      config/locales/forms/2023/sales/soft_validations.en.yml
  93. 63
      config/locales/forms/2024/lettings/guidance.en.yml
  94. 120
      config/locales/forms/2024/lettings/household_situation.en.yml
  95. 127
      config/locales/forms/2024/lettings/property_information.en.yml
  96. 46
      config/locales/forms/2024/sales/guidance.en.yml
  97. 20
      config/locales/validations/lettings/date.en.yml
  98. 53
      config/locales/validations/lettings/setup.en.yml
  99. 19
      spec/features/bulk_upload_lettings_logs_spec.rb
  100. 20
      spec/features/bulk_upload_sales_logs_spec.rb
  101. Some files were not shown because too many files have changed in this diff Show More

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::Address < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address"
@header = "Q#{QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]} - What is the property's address?"
@copy_key = "lettings.property_information.address"
@depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil },
{ "is_supported_housing?" => false, "uprn_known" => 0 },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::AddressFallback < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address"
@header = "Q12 - What is the property's address?"
@copy_key = "lettings.property_information.address"
@depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil, "uprn_selection" => "uprn_not_listed" },
{ "is_supported_housing?" => false, "uprn_known" => 0, "uprn_selection" => "uprn_not_listed" },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::AddressMatcher < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address_matcher"
@header = "Find an address"
@copy_key = "lettings.property_information.address_matcher"
@depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil },
{ "is_supported_housing?" => false, "uprn_known" => 0 },

1
app/models/form/lettings/pages/previous_housing_situation.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousHousingSituation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "previous_housing_situation"
@copy_key = "lettings.household_situation.prevten.not_renewal"
@depends_on = [{ "is_renewal?" => false }]
end

1
app/models/form/lettings/pages/previous_housing_situation_renewal.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousHousingSituationRenewal < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "previous_housing_situation_renewal"
@copy_key = "lettings.household_situation.prevten.renewal"
@depends_on = [{ "is_renewal?" => true, "is_supported_housing?" => true }]
end

1
app/models/form/lettings/pages/previous_local_authority.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousLocalAuthority < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "previous_local_authority"
@copy_key = "lettings.household_situation.previous_local_authority"
@depends_on = [{ "is_previous_la_inferred" => false, "renewal" => 0 }]
end

1
app/models/form/lettings/pages/previous_postcode.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousPostcode < ::Form::Page
def initialize(id, hsh, page)
super
@depends_on = [{ "renewal" => 0 }]
@copy_key = "lettings.household_situation.previous_postcode"
end
def questions

1
app/models/form/lettings/pages/property_major_repairs.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::PropertyMajorRepairs < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_major_repairs"
@copy_key = "lettings.property_information.property_major_repairs"
@depends_on = [{ "is_renewal?" => false, "vacancy_reason_not_renewal_or_first_let?" => true }]
end

1
app/models/form/lettings/pages/reason_for_leaving_last_settled_home.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReasonForLeavingLastSettledHome < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "reason_for_leaving_last_settled_home"
@copy_key = "lettings.household_situation.reason.reason_for_leaving_last_settled_home"
@depends_on = [{ "renewal" => 0 }]
end

1
app/models/form/lettings/pages/reason_for_leaving_last_settled_home_renewal.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReasonForLeavingLastSettledHomeRenewal < ::Form::Pa
def initialize(id, hsh, subsection)
super
@id = "reason_for_leaving_last_settled_home_renewal"
@copy_key = "lettings.household_situation.reason.reason_for_leaving_last_settled_home_renewal"
@depends_on = [{ "renewal" => 1 }]
end

1
app/models/form/lettings/pages/referral.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::Referral < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "referral"
@copy_key = "lettings.household_situation.referral.general_needs.la"
@depends_on = [{ "owning_organisation_provider_type" => "LA", "needstype" => 1, "renewal" => 0 }]
end

1
app/models/form/lettings/pages/referral_prp.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReferralPrp < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "referral_prp"
@copy_key = "lettings.household_situation.referral.general_needs.prp"
@depends_on = [{ "owning_organisation_provider_type" => "PRP", "needstype" => 1, "renewal" => 0 }]
end

1
app/models/form/lettings/pages/referral_supported_housing.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReferralSupportedHousing < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "referral_supported_housing"
@copy_key = "lettings.household_situation.referral.supported_housing.la"
@depends_on = [{ "owning_organisation_provider_type" => "LA", "needstype" => 2, "renewal" => 0 }]
end

1
app/models/form/lettings/pages/referral_supported_housing_prp.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReferralSupportedHousingPrp < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "referral_supported_housing_prp"
@copy_key = "lettings.household_situation.referral.supported_housing.prp"
@depends_on = [{ "owning_organisation_provider_type" => "PRP", "needstype" => 2, "renewal" => 0 }]
end

1
app/models/form/lettings/pages/uprn.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::Uprn < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "uprn"
@copy_key = "lettings.property_information.uprn"
@depends_on = [{ "is_supported_housing?" => false }]
end

1
app/models/form/lettings/pages/uprn_selection.rb

@ -2,7 +2,6 @@ class Form::Lettings::Pages::UprnSelection < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "uprn_selection"
@header = "We found some addresses that might be this property"
@depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil, "address_options_present?" => true },
{ "is_supported_housing?" => false, "uprn_known" => 0, "address_options_present?" => true },

1
app/models/form/lettings/pages/void_date.rb

@ -2,7 +2,6 @@ class Form::Lettings::Pages::VoidDate < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "void_date"
@header = "Void date"
@depends_on = [{ "is_renewal?" => false }]
end

3
app/models/form/lettings/questions/address_line1.rb

@ -2,11 +2,10 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
def initialize(id, hsh, page)
super
@id = "address_line1"
@header = "Address line 1"
@copy_key = "lettings.property_information.address.address_line1"
@error_label = "Address line 1"
@type = "text"
@plain_label = true
@check_answer_label = "Address lines 1 and 2"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true

3
app/models/form/lettings/questions/address_line1_for_address_matcher.rb

@ -2,11 +2,10 @@ class Form::Lettings::Questions::AddressLine1ForAddressMatcher < ::Form::Questio
def initialize(id, hsh, page)
super
@id = "address_line1_input"
@header = "Address line 1"
@copy_key = "lettings.property_information.address_matcher.address_line1_input"
@error_label = "Address line 1"
@type = "text"
@plain_label = true
@check_answer_label = "Find address"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@hide_question_number_on_page = true
end

2
app/models/form/lettings/questions/address_line2.rb

@ -2,7 +2,7 @@ class Form::Lettings::Questions::AddressLine2 < ::Form::Question
def initialize(id, hsh, page)
super
@id = "address_line2"
@header = "Address line 2 (optional)"
@copy_key = "lettings.property_information.address.address_line2"
@type = "text"
@plain_label = true
@disable_clearing_if_not_routed_or_dynamic_answer_options = true

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

@ -2,8 +2,6 @@ class Form::Lettings::Questions::Beds < ::Form::Question
def initialize(id, hsh, page)
super
@id = "beds"
@check_answer_label = "Number of bedrooms"
@header = "How many bedrooms does the property have?"
@type = "numeric"
@width = 2
@check_answers_card_number = 0
@ -17,9 +15,5 @@ class Form::Lettings::Questions::Beds < ::Form::Question
log.is_bedsit?
end
def hint_text
form.start_year_after_2024? ? "If shared accommodation, enter the number of bedrooms occupied by this household." : "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 22 }.freeze
end

3
app/models/form/lettings/questions/builtype.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Builtype < ::Form::Question
def initialize(id, hsh, page)
super
@id = "builtype"
@check_answer_label = "Type of building"
@header = "What type of building is the property?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@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

3
app/models/form/lettings/questions/county.rb

@ -2,10 +2,9 @@ class Form::Lettings::Questions::County < ::Form::Question
def initialize(id, hsh, page)
super
@id = "county"
@header = "County (optional)"
@copy_key = "lettings.property_information.address.county"
@type = "text"
@plain_label = true
@check_answer_label = "County"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true

2
app/models/form/lettings/questions/declaration.rb

@ -4,7 +4,7 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
@id = "declaration"
@type = "checkbox"
@check_answers_card_number = 0 unless form.start_year_after_2024?
@top_guidance_partial = form.start_year_after_2024? ? "privacy_notice_tenant_2024" : "privacy_notice_tenant"
@top_guidance_partial = "privacy_notice_tenant"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
def initialize(id, hsh, page)
super
@id = "first_time_property_let_as_social_housing"
@check_answer_label = "First time being let as social-housing?"
@header = "Is this the first time the property has been let as social housing?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/homeless.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Homeless < ::Form::Question
def initialize(id, hsh, page)
super
@id = "homeless"
@check_answer_label = "Household homeless immediately before letting"
@header = "Did the household experience homelessness immediately before this letting?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@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

2
app/models/form/lettings/questions/la.rb

@ -2,8 +2,6 @@ class Form::Lettings::Questions::La < ::Form::Question
def initialize(id, hsh, page)
super
@id = "la"
@check_answer_label = "Local Authority"
@header = "What is the property’s local authority?"
@type = "select"
@check_answers_card_number = nil
@hint_text = ""

3
app/models/form/lettings/questions/layear.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Layear < ::Form::Question
def initialize(id, hsh, page)
super
@id = "layear"
@check_answer_label = "Length of time in local authority area"
@header = "How long has the household continuously lived in the local authority area of the new letting?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/letting_allocation.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
def initialize(id, hsh, page)
super
@id = "letting_allocation"
@check_answer_label = "Allocation system"
@header = "How was this letting allocated?"
@type = "checkbox"
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

4
app/models/form/lettings/questions/majorrepairs.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::Majorrepairs < ::Form::Question
def initialize(id, hsh, page)
super
@id = "majorrepairs"
@check_answer_label = "Major repairs carried out during void period"
@header = "Were any major repairs carried out during the void period?"
@copy_key = "lettings.property_information.property_major_repairs.majorrepairs"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "mrcdate" => [1] }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

3
app/models/form/lettings/questions/mrcdate.rb

@ -2,8 +2,7 @@ class Form::Lettings::Questions::Mrcdate < ::Form::Question
def initialize(id, hsh, page)
super
@id = "mrcdate"
@check_answer_label = "Completion date of repairs"
@header = "When were the repairs completed?"
@copy_key = "lettings.property_information.property_major_repairs.mrcdate"
@type = "date"
@check_answers_card_number = 0
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

2
app/models/form/lettings/questions/offered.rb

@ -2,8 +2,6 @@ class Form::Lettings::Questions::Offered < ::Form::Question
def initialize(id, hsh, page)
super
@id = "offered"
@check_answer_label = I18n.t("check_answer_labels.offered")
@header = I18n.t("questions.offered")
@type = "numeric"
@width = 2
@check_answers_card_number = 0

2
app/models/form/lettings/questions/postcode_for_address_matcher.rb

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PostcodeForAddressMatcher < ::Form::Question
def initialize(id, hsh, page)
super
@id = "postcode_full_input"
@header = "Postcode"
@copy_key = "lettings.property_information.address_matcher.postcode_full_input"
@type = "text"
@width = 5
@plain_label = true

3
app/models/form/lettings/questions/postcode_for_full_address.rb

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
def initialize(id, hsh, page)
super
@id = "postcode_full"
@header = "Postcode"
@copy_key = "lettings.property_information.address.postcode_full"
@type = "text"
@width = 5
@inferred_check_answers_value = [{
@ -17,7 +17,6 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
},
}
@plain_label = true
@check_answer_label = "Postcode"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true

4
app/models/form/lettings/questions/ppcodenk.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ppcodenk"
@check_answer_label = ""
@header = "Do you know the postcode of the household’s last settled accommodation?"
@copy_key = "lettings.household_situation.previous_postcode.ppcodenk"
@type = "radio"
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." : "This is also known as the household’s ‘last settled home’."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "ppostcode_full" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] }

4
app/models/form/lettings/questions/ppostcode_full.rb

@ -2,8 +2,7 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ppostcode_full"
@check_answer_label = "Postcode of household’s last settled accommodation"
@header = "Postcode for the previous accommodation"
@copy_key = "lettings.household_situation.previous_postcode.ppostcode_full"
@type = "text"
@width = 5
@inferred_check_answers_value = [{
@ -13,7 +12,6 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question
"value" => "Not known",
}]
@check_answers_card_number = 0
@hint_text = ""
@inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } }
@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

4
app/models/form/lettings/questions/previous_la_known.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::PreviousLaKnown < ::Form::Question
def initialize(id, hsh, page)
super
@id = "previous_la_known"
@check_answer_label = "Do you know the local authority of the household’s last settled accommodation?"
@header = "Do you know the local authority of the household’s last settled accommodation?"
@copy_key = "lettings.household_situation.previous_local_authority.previous_la_known"
@type = "radio"
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." : "This is also known as the household’s ‘last settled home’."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "prevloc" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] }

3
app/models/form/lettings/questions/previous_let_type.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
def initialize(id, hsh, page)
super
@id = "unitletas"
@check_answer_label = "Most recent let type"
@header = "What type was the property most recently let as?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is the rent type of the previous tenancy in this property." : ""
@answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_AFTER_2024 : ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

4
app/models/form/lettings/questions/previous_tenure.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
def initialize(id, hsh, page)
super
@id = "prevten"
@check_answer_label = "Where was the household immediately before this letting?"
@header = "Where was the household immediately before this letting?"
@copy_key = "lettings.household_situation.prevten.not_renewal"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "This is where the household was the night before they moved into this new let."
@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

5
app/models/form/lettings/questions/previous_tenure_renewal.rb

@ -2,12 +2,9 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
def initialize(id, hsh, page)
super
@id = "prevten"
@check_answer_label = "Where was the household immediately before this letting?"
@header = "Where was the household immediately before this letting?"
@copy_key = "lettings.household_situation.prevten.renewal"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "You told us this letting is a renewal. We have removed some options because of this.<br><br>
This is where the household was the night before they moved into this new let."
@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

4
app/models/form/lettings/questions/prevloc.rb

@ -2,12 +2,10 @@ class Form::Lettings::Questions::Prevloc < ::Form::Question
def initialize(id, hsh, page)
super
@id = "prevloc"
@check_answer_label = "Location of household’s last settled accommodation"
@header = "Select a local authority"
@copy_key = "lettings.household_situation.previous_local_authority.prevloc"
@type = "select"
@inferred_check_answers_value = [{ "condition" => { "previous_la_known" => 0 }, "value" => "Not known" }]
@check_answers_card_number = 0
@hint_text = "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
@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

4
app/models/form/lettings/questions/reason.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::Reason < ::Form::Question
def initialize(id, hsh, page)
super
@id = "reason"
@check_answer_label = "Reason for leaving last settled home"
@header = "What is the tenant’s main reason for the household leaving their last settled home?"
@copy_key = "lettings.household_situation.reason.#{page.id}.reason"
@type = "radio"
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously." : "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously."
@conditional_for = {
"reasonother" => [
20,

4
app/models/form/lettings/questions/reason_renewal.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
def initialize(id, hsh, page)
super
@id = "reason"
@check_answer_label = "Reason for leaving last settled home"
@header = "What is the tenant’s main reason for the household leaving their last settled home?"
@type = "radio"
@copy_key = "lettings.household_situation.reason.#{page.id}.reason"
@check_answers_card_number = 0
@hint_text = "You told us this letting is a renewal. We have removed some options because of this."
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@conditional_for = {
"reasonother" => [

3
app/models/form/lettings/questions/reasonable_preference_reason.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question
def initialize(id, hsh, page)
super
@id = "reasonable_preference_reason"
@check_answer_label = "Reason for reasonable preference"
@header = "Why was the household given ‘reasonable preference’?"
@type = "checkbox"
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@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

4
app/models/form/lettings/questions/reasonother.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::Reasonother < ::Form::Question
def initialize(id, hsh, page)
super
@id = "reasonother"
@check_answer_label = ""
@header = "What is the reason?"
@copy_key = "lettings.household_situation.reason.#{@page.id}.reasonother"
@type = "text"
@check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/reasonpref.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question
def initialize(id, hsh, page)
super
@id = "reasonpref"
@check_answer_label = "Household given reasonable preference"
@header = "Was the household given ‘reasonable preference’ by the local authority?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’." : "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
@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

4
app/models/form/lettings/questions/referral.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::Referral < ::Form::Question
def initialize(id, hsh, page)
super
@id = "referral"
@check_answer_label = "Source of referral for letting"
@header = "What was the source of referral for this letting?"
@copy_key = "lettings.household_situation.referral.general_needs.la"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

4
app/models/form/lettings/questions/referral_prp.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
def initialize(id, hsh, page)
super
@id = "referral"
@check_answer_label = "Source of referral for letting"
@header = "What was the source of referral for this letting?"
@copy_key = "lettings.household_situation.referral.general_needs.prp"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "You told us that the needs type is general needs. We have removed some options because of this."
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

4
app/models/form/lettings/questions/referral_supported_housing.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
def initialize(id, hsh, page)
super
@id = "referral"
@check_answer_label = "Source of referral for letting"
@header = "What was the source of referral for this letting?"
@copy_key = "lettings.household_situation.referral.supported_housing.la"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "You told us that you are a local authority. We have removed some options because of this."
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

4
app/models/form/lettings/questions/referral_supported_housing_prp.rb

@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
def initialize(id, hsh, page)
super
@id = "referral"
@check_answer_label = "Source of referral for letting"
@header = "What was the source of referral for this letting?"
@copy_key = "lettings.household_situation.referral.supported_housing.prp"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

2
app/models/form/lettings/questions/rent_type.rb

@ -4,7 +4,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@id = "rent_type"
@copy_key = "lettings.setup.rent_type.rent_type"
@type = "radio"
@top_guidance_partial = form.start_year_after_2024? ? "rent_type_definitions_2024" : "rent_type_definitions"
@top_guidance_partial = "rent_type_definitions"
@answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_2024 : ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?

3
app/models/form/lettings/questions/rsnvac.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
def initialize(id, hsh, page)
super
@id = "rsnvac"
@check_answer_label = "Vacancy reason"
@header = "What is the reason for the property being vacant?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/rsnvac_first_let.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
def initialize(id, hsh, page)
super
@id = "rsnvac"
@check_answer_label = "Vacancy reason"
@header = "What is the reason for the property being vacant?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@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

3
app/models/form/lettings/questions/town_or_city.rb

@ -2,10 +2,9 @@ class Form::Lettings::Questions::TownOrCity < ::Form::Question
def initialize(id, hsh, page)
super
@id = "town_or_city"
@header = "Town or city"
@copy_key = "lettings.property_information.address.town_or_city"
@type = "text"
@plain_label = true
@check_answer_label = "Town or city"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true

3
app/models/form/lettings/questions/unittype_gn.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::UnittypeGn < ::Form::Question
def initialize(id, hsh, page)
super
@id = "unittype_gn"
@check_answer_label = "Type of unit"
@header = "What type of unit is the property?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@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

3
app/models/form/lettings/questions/uprn.rb

@ -2,8 +2,7 @@ class Form::Lettings::Questions::Uprn < ::Form::Question
def initialize(id, hsh, page)
super
@id = "uprn"
@check_answer_label = "UPRN"
@header = "What is the property's UPRN?"
@copy_key = "lettings.property_information.uprn.uprn"
@type = "text"
@width = 10
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

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

@ -2,13 +2,9 @@ class Form::Lettings::Questions::UprnKnown < ::Form::Question
def initialize(id, hsh, page)
super
@id = "uprn_known"
@check_answer_label = "UPRN known?"
@header = "Do you know the property's UPRN?"
@copy_key = "lettings.property_information.uprn.uprn_known"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.<br><br>
The UPRN may not be the same as the property reference assigned by your organisation.<br><br>
If you dont know the UPRN you can enter the address of the property instead on the next screen."
@conditional_for = { "uprn" => [1] }
@inferred_check_answers_value = [
{

2
app/models/form/lettings/questions/uprn_selection.rb

@ -2,9 +2,7 @@ class Form::Lettings::Questions::UprnSelection < ::Form::Question
def initialize(id, hsh, page)
super
@id = "uprn_selection"
@header = "Select the correct address"
@type = "radio"
@check_answer_label = "Select the correct address"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end

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

@ -2,8 +2,6 @@ class Form::Lettings::Questions::Voiddate < ::Form::Question
def initialize(id, hsh, page)
super
@id = "voiddate"
@check_answer_label = "Void date"
@header = "What is the void date?"
@type = "date"
@check_answers_card_number = 0
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

3
app/models/form/lettings/questions/waityear.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
def initialize(id, hsh, page)
super
@id = "waityear"
@check_answer_label = "Length of time on local authority waiting list"
@header = form.start_year_after_2024? ? "How long has the household been on the local authority waiting list for the area of the new letting?" : "How long has the household been on the local authority waiting list for the new letting?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/wheelchair.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Wheelchair < ::Form::Question
def initialize(id, hsh, page)
super
@id = "wchair"
@check_answer_label = "Property built or adapted to wheelchair-user standards"
@header = "Is the property built or adapted to wheelchair-user standards?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property." : ""
@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

2
app/models/form/lettings/subsections/property_information.rb

@ -34,7 +34,7 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection
Form::Lettings::Pages::Uprn.new(nil, nil, self),
Form::Lettings::Pages::UprnConfirmation.new(nil, nil, self),
Form::Lettings::Pages::AddressMatcher.new(nil, nil, self),
Form::Lettings::Pages::NoAddressFound.new(nil, nil, self),
Form::Lettings::Pages::NoAddressFound.new(nil, nil, self), # soft validation
Form::Lettings::Pages::UprnSelection.new(nil, nil, self),
Form::Lettings::Pages::AddressFallback.new(nil, nil, self),
]

6
app/models/form/sales/questions/privacy_notice.rb

@ -29,11 +29,7 @@ class Form::Sales::Questions::PrivacyNotice < ::Form::Question
end
def guidance
if form.start_year_after_2024?
@joint_purchase ? "privacy_notice_buyer_2024_joint_purchase" : "privacy_notice_buyer_2024"
else
@joint_purchase ? "privacy_notice_buyer_joint_purchase" : "privacy_notice_buyer"
end
@joint_purchase ? "privacy_notice_buyer_joint_purchase" : "privacy_notice_buyer"
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 19, 2024 => 14 }.freeze

10
app/models/form/sales/questions/shared_ownership_type.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
super
@id = "type"
@copy_key = "sales.setup.type.shared_ownership"
@top_guidance_partial = guidance_partial
@top_guidance_partial = "shared_ownership_type_definitions"
@type = "radio"
@answer_options = answer_options
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@ -34,13 +34,5 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
end
end
def guidance_partial
if form.start_year_after_2024?
"shared_ownership_type_definitions_2024"
elsif form.start_date.year >= 2023
"shared_ownership_type_definitions"
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 4, 2024 => 6 }.freeze
end

11
app/models/forms/bulk_upload_lettings/upload_your_file.rb

@ -15,6 +15,7 @@ module Forms
validates :file, presence: true
validate :validate_file_is_csv
validate :validate_file_size
def view_path
"bulk_upload_lettings_logs/forms/upload_your_file"
@ -73,6 +74,16 @@ module Forms
errors.add(:file, :not_csv)
end
end
MAX_FILE_SIZE = 10.megabytes
def validate_file_size
return unless file
if file.size > MAX_FILE_SIZE
errors.add(:file, :file_too_large)
end
end
end
end
end

11
app/models/forms/bulk_upload_sales/upload_your_file.rb

@ -14,6 +14,7 @@ module Forms
validates :file, presence: true
validate :validate_file_is_csv
validate :validate_file_size
def view_path
"bulk_upload_sales_logs/forms/upload_your_file"
@ -67,6 +68,16 @@ module Forms
errors.add(:file, :not_csv)
end
end
MAX_FILE_SIZE = 10.megabytes
def validate_file_size
return unless file
if file.size > MAX_FILE_SIZE
errors.add(:file, :file_too_large)
end
end
end
end
end

22
app/models/validations/date_validations.rb

@ -4,30 +4,30 @@ module Validations::DateValidations
def validate_property_major_repairs(record)
date_valid?("mrcdate", record)
if record["startdate"].present? && record["mrcdate"].present? && record["startdate"] < record["mrcdate"]
record.errors.add :mrcdate, I18n.t("validations.property.mrcdate.before_tenancy_start")
record.errors.add :mrcdate, I18n.t("validations.lettings.date.mrcdate.before_tenancy_start")
end
if is_rsnvac_first_let?(record) && record["mrcdate"].present?
record.errors.add :mrcdate, I18n.t("validations.property.mrcdate.not_first_let")
record.errors.add :mrcdate, I18n.t("validations.lettings.date.mrcdate.not_first_let")
end
if record["mrcdate"].present? && record["startdate"].present? && record["startdate"].to_date - record["mrcdate"].to_date > 3650
record.errors.add :mrcdate, I18n.t("validations.property.mrcdate.ten_years_before_tenancy_start")
record.errors.add :mrcdate, I18n.t("validations.lettings.date.mrcdate.ten_years_before_tenancy_start")
end
end
def validate_property_void_date(record)
if record["voiddate"].present? && record["startdate"].present? && record["startdate"].to_date - record["voiddate"].to_date > 3650
record.errors.add :voiddate, I18n.t("validations.property.void_date.ten_years_before_tenancy_start")
record.errors.add :voiddate, I18n.t("validations.lettings.date.void_date.ten_years_before_tenancy_start")
end
if record["voiddate"].present? && record["startdate"].present? && record["startdate"].to_date < record["voiddate"].to_date
record.errors.add :voiddate, I18n.t("validations.property.void_date.before_tenancy_start")
record.errors.add :voiddate, I18n.t("validations.lettings.date.void_date.before_tenancy_start")
end
if record["voiddate"].present? && record["mrcdate"].present? && record["mrcdate"].to_date < record["voiddate"].to_date
record.errors.add :voiddate, :after_mrcdate, message: I18n.t("validations.property.void_date.after_mrcdate")
record.errors.add :mrcdate, I18n.t("validations.property.mrcdate.before_void_date")
record.errors.add :voiddate, :after_mrcdate, message: I18n.t("validations.lettings.date.void_date.after_mrcdate")
record.errors.add :mrcdate, I18n.t("validations.lettings.date.mrcdate.before_void_date")
end
end
@ -35,19 +35,19 @@ module Validations::DateValidations
return unless record.startdate && date_valid?("startdate", record)
if record["voiddate"].present? && record.startdate < record["voiddate"]
record.errors.add :startdate, I18n.t("validations.setup.startdate.after_void_date")
record.errors.add :startdate, I18n.t("validations.lettings.date.startdate.after_void_date")
end
if record["mrcdate"].present? && record.startdate < record["mrcdate"]
record.errors.add :startdate, I18n.t("validations.setup.startdate.after_major_repair_date")
record.errors.add :startdate, I18n.t("validations.lettings.date.startdate.after_major_repair_date")
end
if record["voiddate"].present? && record["startdate"].to_date - record["voiddate"].to_date > 3650
record.errors.add :startdate, I18n.t("validations.setup.startdate.ten_years_after_void_date")
record.errors.add :startdate, I18n.t("validations.lettings.date.startdate.ten_years_after_void_date")
end
if record["mrcdate"].present? && record["startdate"].to_date - record["mrcdate"].to_date > 3650
record.errors.add :startdate, I18n.t("validations.setup.startdate.ten_years_after_mrc_date")
record.errors.add :startdate, I18n.t("validations.lettings.date.startdate.ten_years_after_mrc_date")
end
end

80
app/models/validations/setup_validations.rb

@ -16,42 +16,42 @@ module Validations::SetupValidations
end
if record.startdate > Time.zone.today + 14.days
record.errors.add :startdate, I18n.t("validations.setup.startdate.later_than_14_days_after")
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.not_within.next_two_weeks")
end
end
def validate_organisation(record)
assigned_to, managing_organisation, owning_organisation = record.values_at("assigned_to", "managing_organisation", "owning_organisation")
unless [assigned_to, managing_organisation, owning_organisation].any?(&:blank?) || ((assigned_to.organisation.absorbed_organisations + [assigned_to.organisation]) & [managing_organisation, owning_organisation]).present?
record.errors.add :assigned_to, I18n.t("validations.setup.assigned_to.invalid")
record.errors.add :owning_organisation_id, I18n.t("validations.setup.owning_organisation.invalid")
record.errors.add :managing_organisation_id, I18n.t("validations.setup.managing_organisation.invalid")
record.errors.add :assigned_to, I18n.t("validations.lettings.setup.assigned_to.invalid")
record.errors.add :owning_organisation_id, I18n.t("validations.lettings.setup.owning_organisation.invalid")
record.errors.add :managing_organisation_id, I18n.t("validations.lettings.setup.managing_organisation.invalid")
end
return unless record.startdate
if owning_organisation.present?
if owning_organisation&.merge_date.present? && owning_organisation.merge_date <= record.startdate
record.errors.add :owning_organisation_id, I18n.t("validations.setup.owning_organisation.inactive_merged_organisation",
record.errors.add :owning_organisation_id, I18n.t("validations.lettings.setup.owning_organisation.inactive.merged_organisation",
owning_organisation: record.owning_organisation.name,
owning_organisation_merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
owning_absorbing_organisation: record.owning_organisation.absorbing_organisation.name)
merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
absorbing_organisation: record.owning_organisation.absorbing_organisation.name)
elsif owning_organisation&.absorbed_organisations.present? && owning_organisation.available_from.present? && owning_organisation.available_from.to_date > record.startdate.to_date
record.errors.add :owning_organisation_id, I18n.t("validations.setup.owning_organisation.inactive_absorbing_organisation",
record.errors.add :owning_organisation_id, I18n.t("validations.lettings.setup.owning_organisation.inactive.absorbing_organisation",
owning_organisation: record.owning_organisation.name,
owning_organisation_available_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date))
available_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date))
end
end
if managing_organisation.present?
if managing_organisation&.merge_date.present? && managing_organisation.merge_date <= record.startdate
record.errors.add :managing_organisation_id, I18n.t("validations.setup.managing_organisation.inactive_merged_organisation",
record.errors.add :managing_organisation_id, I18n.t("validations.lettings.setup.managing_organisation.inactive.merged_organisation",
managing_organisation: record.managing_organisation.name,
managing_organisation_merge_date: record.managing_organisation.merge_date.to_formatted_s(:govuk_date),
managing_absorbing_organisation: record.managing_organisation.absorbing_organisation.name)
merge_date: record.managing_organisation.merge_date.to_formatted_s(:govuk_date),
absorbing_organisation: record.managing_organisation.absorbing_organisation.name)
elsif managing_organisation&.absorbed_organisations.present? && managing_organisation.available_from.present? && managing_organisation.available_from.to_date > record.startdate.to_date
record.errors.add :managing_organisation_id, I18n.t("validations.setup.managing_organisation.inactive_absorbing_organisation",
record.errors.add :managing_organisation_id, I18n.t("validations.lettings.setup.managing_organisation.inactive.absorbing_organisation",
managing_organisation: record.managing_organisation.name,
managing_organisation_available_from: record.managing_organisation.available_from.to_formatted_s(:govuk_date))
available_from: record.managing_organisation.available_from.to_formatted_s(:govuk_date))
end
end
end
@ -68,7 +68,7 @@ module Validations::SetupValidations
def validate_irproduct_other(record)
if intermediate_product_rent_type?(record) && record.irproduct_other.blank?
record.errors.add :irproduct_other, I18n.t("validations.setup.intermediate_rent_product_name.blank")
record.errors.add :irproduct_other, I18n.t("validations.lettings.setup.intermediate_rent_product_name.blank")
end
end
@ -76,13 +76,13 @@ module Validations::SetupValidations
return unless record.scheme
unless record.scheme.locations.confirmed.any?
record.errors.add :scheme_id, :no_completed_locations, message: I18n.t("validations.scheme.no_completed_locations")
record.errors.add :scheme_id, :no_completed_locations, message: I18n.t("validations.lettings.setup.scheme.no_completed_locations")
end
end
def validate_scheme(record)
if record.scheme&.status == :incomplete
record.errors.add :scheme_id, :incomplete, message: I18n.t("validations.setup.scheme.incomplete")
record.errors.add :scheme_id, :incomplete, message: I18n.t("validations.lettings.setup.scheme.incomplete")
end
scheme_during_startdate_validation(record)
@ -93,8 +93,8 @@ module Validations::SetupValidations
location_during_startdate_validation(record)
if record.location&.status == :incomplete
record.errors.add :location_id, :incomplete, message: I18n.t("validations.setup.location.incomplete")
record.errors.add :scheme_id, :incomplete, message: I18n.t("validations.setup.location.incomplete")
record.errors.add :location_id, :incomplete, message: I18n.t("validations.lettings.setup.location.incomplete")
record.errors.add :scheme_id, :incomplete, message: I18n.t("validations.lettings.setup.location.incomplete")
end
end
@ -102,7 +102,7 @@ module Validations::SetupValidations
return if record.skip_dpo_validation
if record.managing_organisation_id_changed? && record.managing_organisation.present? && !record.managing_organisation.data_protection_confirmed?
record.errors.add :managing_organisation_id, I18n.t("validations.setup.managing_organisation.data_sharing_agreement_not_signed")
record.errors.add :managing_organisation_id, I18n.t("validations.lettings.setup.managing_organisation.data_sharing_agreement_not_signed")
end
end
@ -129,7 +129,7 @@ private
if FormHandler.instance.lettings_in_crossover_period?
I18n.t(
"validations.setup.startdate.previous_and_current_collection_year",
"validations.lettings.setup.startdate.must_be_within.previous_and_current_collection_year",
previous_start_year_short: previous_collection_start_date.strftime("%Y"),
previous_end_year_short: previous_collection_end_date.strftime("%Y"),
previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"),
@ -138,7 +138,7 @@ private
)
else
I18n.t(
"validations.setup.startdate.current_collection_year",
"validations.lettings.setup.startdate.must_be_within.current_collection_year",
current_start_year_short: current_collection_start_date.strftime("%Y"),
current_end_year_short: current_collection_end_date.strftime("%Y"),
current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"),
@ -153,20 +153,20 @@ private
def add_same_merge_organisation_error(record)
if merged_owning_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_merged_organisations_start_date.same_organisation",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_merged_organisations_start_date.same_organisation",
owning_organisation: record.owning_organisation.name,
owning_organisation_merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
owning_absorbing_organisation: record.owning_organisation.absorbing_organisation.name)
merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
absorbing_organisation: record.owning_organisation.absorbing_organisation.name)
elsif absorbing_owning_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_absorbing_organisations_start_date.same_organisation",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_absorbing_organisations_start_date.same_organisation",
owning_organisation: record.owning_organisation.name,
owning_organisation_available_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date))
available_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date))
end
end
def add_same_merge_error(record)
if merged_owning_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_merged_organisations_start_date.same_merge",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_merged_organisations_start_date.same_merge",
owning_organisation: record.owning_organisation.name,
managing_organisation: record.managing_organisation.name,
owning_organisation_merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
@ -176,7 +176,7 @@ private
def add_merged_organisations_errors(record)
if merged_owning_organisation_inactive?(record) && merged_managing_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_merged_organisations_start_date.different_merge",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_merged_organisations_start_date.different_merge",
owning_organisation: record.owning_organisation.name,
owning_organisation_merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
owning_absorbing_organisation: record.owning_organisation.absorbing_organisation.name,
@ -185,39 +185,39 @@ private
managing_absorbing_organisation: record.managing_organisation.absorbing_organisation.name)
else
if merged_owning_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_merged_organisations_start_date.owning_organisation",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_merged_organisations_start_date.owning_organisation",
owning_organisation: record.owning_organisation.name,
owning_organisation_merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
owning_absorbing_organisation: record.owning_organisation.absorbing_organisation.name)
merge_date: record.owning_organisation.merge_date.to_formatted_s(:govuk_date),
absorbing_organisation: record.owning_organisation.absorbing_organisation.name)
end
if merged_managing_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_merged_organisations_start_date.managing_organisation",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_merged_organisations_start_date.managing_organisation",
managing_organisation: record.managing_organisation.name,
managing_organisation_merge_date: record.managing_organisation.merge_date.to_formatted_s(:govuk_date),
managing_absorbing_organisation: record.managing_organisation.absorbing_organisation.name)
merge_date: record.managing_organisation.merge_date.to_formatted_s(:govuk_date),
absorbing_organisation: record.managing_organisation.absorbing_organisation.name)
end
end
end
def add_absorbing_organisations_errors(record)
if absorbing_owning_organisation_inactive?(record) && absorbing_managing_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_absorbing_organisations_start_date.different_organisations",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_absorbing_organisations_start_date.different_organisations",
owning_organisation: record.owning_organisation.name,
owning_organisation_active_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date),
managing_organisation: record.managing_organisation.name,
managing_organisation_active_from: record.managing_organisation.available_from.to_formatted_s(:govuk_date))
else
if absorbing_owning_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_absorbing_organisations_start_date.owning_organisation",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_absorbing_organisations_start_date.owning_organisation",
owning_organisation: record.owning_organisation.name,
owning_organisation_available_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date))
available_from: record.owning_organisation.available_from.to_formatted_s(:govuk_date))
end
if absorbing_managing_organisation_inactive?(record)
record.errors.add :startdate, I18n.t("validations.setup.startdate.invalid_absorbing_organisations_start_date.managing_organisation",
record.errors.add :startdate, I18n.t("validations.lettings.setup.startdate.invalid_absorbing_organisations_start_date.managing_organisation",
managing_organisation: record.managing_organisation.name,
managing_organisation_available_from: record.managing_organisation.available_from.to_formatted_s(:govuk_date))
available_from: record.managing_organisation.available_from.to_formatted_s(:govuk_date))
end
end
end

28
app/views/form/guidance/_discounted_ownership_type_definitions.erb

@ -1,23 +1,5 @@
<%= govuk_details(summary_text: "Discounted ownership type definitions") do %>
<p class="govuk-body">
<b>Right to Acquire (RTA):</b> a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
</p>
<p class="govuk-body">
<b>Preserved Right to Buy (PRTB):</b> a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
</p>
<p class="govuk-body">
<b>Voluntary Right to Buy (VRTB):</b> a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
</p>
<p class="govuk-body">
<b>Right to Buy (RTB):</b> a discounted sale to tenants in this council owned property.
</p>
<p class="govuk-body">
<b>Rent to Buy full ownership:</b> a sale on full ownership terms following a period of discounted rent.
</p>
<p class="govuk-body">
<b>Social HomeBuy for outright purchase:</b> a discounted sale to tenants of a private registered provider on full ownership terms.
</p>
<p class="govuk-body">
<b>Any other equity loan scheme:</b> any scheme, not covered elsewhere, in which a loan is used to purchase equity.
</p>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.discounted_ownership_type_definitions.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.discounted_ownership_type_definitions.content").html_safe %>
<% end %>
</div>

10
app/views/form/guidance/_finding_location.erb

@ -1,4 +1,6 @@
<%= govuk_details(summary_text: "What is a location?") do %>
<p class="govuk-body">A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode.</p>
<p class="govuk-body"><%= govuk_link_to("Read more about schemes and locations", scheme_changes_path) %></p>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_location.title")) do %>
<p><%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_location.content").html_safe %></p>
<p><%= govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_location.scheme_changes_link_text"), scheme_changes_path) %></p>
<% end %>
</div>

13
app/views/form/guidance/_finding_scheme.erb

@ -1,6 +1,7 @@
<%= govuk_details(summary_text: "Can’t find your scheme?") do %>
<p class="govuk-body">Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 "Which organisation owns this property?"</p>
<p class="govuk-body">If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.</p>
<p class="govuk-body"><%= govuk_link_to("View your organisation’s schemes", clear_filters_url(filter_type: "schemes")) %></p>
<p class="govuk-body"><%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %></p>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_scheme.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_scheme.content").html_safe %>
<p><%= govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_scheme.view_schemes_link_text"), clear_filters_url(filter_type: "schemes")) %></p>
<p><%= govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_scheme.scheme_changes_link_text"), scheme_changes_path) %></p>
<% end %>
</div>

8
app/views/form/guidance/_mortgage_lender.html.erb

@ -1,7 +1,3 @@
<%= govuk_details(summary_text: "Can’t find the mortgage lender you’re looking for?") do %>
<ul class="govuk-list govuk-list--bullet">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>Type Other and continue - we’ll ask you to type in your answer in the next question</li>
</ul>
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.mortgage_lender.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.mortgage_lender.content").html_safe %>
<% end %>

13
app/views/form/guidance/_outright_sale_type_definitions.erb

@ -1,8 +1,5 @@
<%= govuk_details(summary_text: "Outright sale type definitions") do %>
<p class="govuk-body">
<b>Outright sale:</b> the full purchase of a property, usually with a mortgage or cash.
</p>
<p class="govuk-body">
<b>Other sale:</b> any sale which does not fit the criteria of any of the remaining options.
</p>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.outright_sale_type_definitions.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.outright_sale_type_definitions.content").html_safe %>
<% end %>
</div>

4
app/views/form/guidance/_privacy_notice_buyer.erb

@ -1 +1,3 @@
<p class="govuk-body">Make sure the buyer has seen <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log.</p>
<p class="govuk-body">
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer.content", privacy_notice_link: "#{govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer.privacy_notice_link_text"), privacy_notice_path, target: :_blank}").html_safe %>
</p>

1
app/views/form/guidance/_privacy_notice_buyer_2024.erb

@ -1 +0,0 @@
<p class="govuk-body">Make sure the buyer has seen or been given access to <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log. This is a legal requirement under data protection legislation.</p>

1
app/views/form/guidance/_privacy_notice_buyer_2024_joint_purchase.erb

@ -1 +0,0 @@
<p class="govuk-body">Make sure the buyers have seen or been given access to <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log. This is a legal requirement under data protection legislation.</p>

4
app/views/form/guidance/_privacy_notice_buyer_joint_purchase.erb

@ -1 +1,3 @@
<p class="govuk-body">Make sure the buyers have seen <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log.</p>
<p class="govuk-body">
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer_joint_purchase.content", privacy_notice_link: "#{govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer_joint_purchase.privacy_notice_link_text"), privacy_notice_path, target: :_blank}").html_safe %>
</p>

4
app/views/form/guidance/_privacy_notice_tenant.erb

@ -1 +1,3 @@
<p class="govuk-body">Make sure the tenant has seen <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log.</p>
<p class="govuk-body">
<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.privacy_notice_tenant.content", privacy_notice_link: "#{govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.privacy_notice_tenant.privacy_notice_link_text"), privacy_notice_path, target: :_blank}").html_safe %>
</p>

1
app/views/form/guidance/_privacy_notice_tenant_2024.erb

@ -1 +0,0 @@
<p class="govuk-body">Make sure the lead tenant has seen or been given access to <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log. This is a legal requirement under data protection legislation.</p>

26
app/views/form/guidance/_rent_type_definitions.erb

@ -1,21 +1,5 @@
<%= govuk_details(summary_text: "Rent type definitions") do %>
<p class="govuk-body">
<b>Affordable Rent:</b> where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
</p>
<p class="govuk-body">
<b>London Affordable Rent:</b> a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
</p>
<p class="govuk-body">
<b>London Living Rent:</b> a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
</p>
<p class="govuk-body">
<b>Rent to Buy: </b> a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
</p>
<p class="govuk-body">
<b>Social Rent:</b> where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
</p>
<p class="govuk-body">
<b>Other intermediate rent:</b> any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
</p>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.rent_type_definitions.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.rent_type_definitions.content").html_safe %>
<% end %>
</div>

21
app/views/form/guidance/_rent_type_definitions_2024.erb

@ -1,21 +0,0 @@
<%= govuk_details(summary_text: "Rent type definitions") do %>
<p class="govuk-body">
<b>Social Rent:</b> where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
</p>
<p class="govuk-body">
<b>Affordable Rent:</b> where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
</p>
<p class="govuk-body">
<b>London Affordable Rent:</b> a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
</p>
<p class="govuk-body">
<b>Rent to Buy: </b> a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
</p>
<p class="govuk-body">
<b>London Living Rent:</b> a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
</p>
<p class="govuk-body">
<b>Other intermediate rent:</b> any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
</p>
<% end %>

4
app/views/form/guidance/_scheme_selection.html.erb

@ -1,5 +1,5 @@
<% if current_user.data_provider? %>
<p class="govuk-body">If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the <%= govuk_link_to("users page", users_path) %>.</p>
<p class="govuk-body"><%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.scheme_selection.data_provider.content", users_page_link: govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.scheme_selection.data_provider.users_page_link_text"), users_path).to_s).html_safe %></p>
<% elsif current_user.data_coordinator? %>
<p class="govuk-body"><%= govuk_link_to "Create a new supported housing scheme", new_scheme_path %></p>
<p class="govuk-body"><%= govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.scheme_selection.data_coordinator.create_scheme_link_text"), new_scheme_path %></p>
<% end %>

31
app/views/form/guidance/_shared_ownership_type_definitions.erb

@ -1,26 +1,5 @@
<%= govuk_details(summary_text: "Shared ownership type definitions") do %>
<p class="govuk-body">
<b>Shared ownership:</b> Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the 2021 model lease for these properties.
</p>
<p class="govuk-body">
<b>Shared ownership 2021 model lease:</b> Homes bought using the Affordable Homes Programme 2021 to 2026.
</p>
<p class="govuk-body">
<b>Older Persons Shared Ownership:</b> A type of shared ownership for those 55 years and over.
</p>
<p class="govuk-body">
<b>Social HomeBuy shared ownership purchase:</b> Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
</p>
<p class="govuk-body">
<b>Home Ownership for people with Long-Term Disabilities (HOLD):</b> A shared ownership sale for those with long term disabilities.
</p>
<p class="govuk-body">
<b>Rent to Buy shared ownership:</b> A sale following a period of discounted rent.
</p>
<p class="govuk-body">
<b>Right to Shared Ownership:</b> A sale of a share of a rented home to a tenant using this scheme.
</p>
<p class="govuk-body">
<b>London Living Rent shared ownership:</b> A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
</p>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.shared_ownership_type_definitions.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.shared_ownership_type_definitions.content").html_safe %>
<% end %>
</div>

26
app/views/form/guidance/_shared_ownership_type_definitions_2024.erb

@ -1,26 +0,0 @@
<%= govuk_details(summary_text: "Shared ownership type definitions") do %>
<p class="govuk-body">
<b>Shared Ownership (old model lease):</b> Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties.
</p>
<p class="govuk-body">
<b>Shared Ownership (new model lease):</b> Homes bought using the Affordable Homes Programme 2021 to 2026.
</p>
<p class="govuk-body">
<b>Social HomeBuy — shared ownership purchase:</b> Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
</p>
<p class="govuk-body">
<b>Home Ownership for people with Long-Term Disabilities (HOLD):</b> A shared ownership sale for those with long term disabilities.
</p>
<p class="govuk-body">
<b>Older Persons Shared Ownership:</b> A type of shared ownership for those 55 years and over.
</p>
<p class="govuk-body">
<b>Rent to Buy — Shared Ownership:</b> A sale following a period of discounted rent.
</p>
<p class="govuk-body">
<b>Right to Shared Ownership (RtSO):</b> A sale of a share of a rented home to a tenant using this scheme.
</p>
<p class="govuk-body">
<b>London Living Rent — Shared Ownership:</b> A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
</p>
<% end %>

14
app/views/form/guidance/_void_date.html.erb

@ -1,9 +1,5 @@
<%= govuk_details(summary_text: "What is a void date?") do %>
<p class="govuk-body">Date the property was (legally or contractually) available to let, or for:</p>
<ul class="govuk-list govuk-list--bullet">
<li>re-lets: the day after the previous tenant's contract ended</li>
<li>new builds: the day the landlord legally first owned the property (‘completion date’)</li>
<li>new conversions or acquisitions: completion date, or the day after rehabilitation work ended</li>
<li>new leases: the day the landlord got contractual property rights and could let it out to tenants</li>
</ul>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.void_date.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.void_date.content").html_safe %>
<% end %>
</div>

21
app/views/form/guidance/_what_counts_as_income.html.erb

@ -1,16 +1,5 @@
<%= govuk_details(summary_text: "What counts as income?") do %>
<p class="govuk-body">You should include any income after tax from:</p>
<ul class="govuk-list govuk-list--bullet">
<li>employment</li>
<li>pensions</li>
<li>Universal Credit</li>
</ul>
<p class="govuk-body">Don’t include:</p>
<ul class="govuk-list govuk-list--bullet">
<li>National Insurance (NI) contributions and tax</li>
<li>housing benefit</li>
<li>child benefit</li>
<li>council tax support</li>
</ul>
<% end %>
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.what_counts_as_income.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.what_counts_as_income.content").html_safe %>
<% end %>
</div>

52
config/locales/en.yml

@ -90,11 +90,13 @@ en:
file:
blank: "Select which file to upload."
not_csv: "Your file must be in CSV format."
file_too_large: "File must be 10MB or less. Check your file and delete data that does not need to be uploaded."
forms/bulk_upload_sales/upload_your_file:
attributes:
file:
blank: "Select which file to upload."
not_csv: "Your file must be in CSV format."
file_too_large: "File must be 10MB or less. Check your file and delete data that does not need to be uploaded."
forms/bulk_upload_lettings/needstype:
attributes:
needstype:
@ -281,37 +283,14 @@ en:
invalid: "Role must be data accessor, data provider or data coordinator."
setup:
intermediate_rent_product_name:
blank: "Enter name of other intermediate rent product."
saledate:
year_not_two_or_four_digits: "Sale completion year must be 2 or 4 digits."
type:
percentage_bought_must_be_at_least_threshold: "The minimum increase in equity while staircasing is %{threshold}% for this shared ownership type."
startdate:
current_collection_year:
"Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
later_than_14_days_after: "The tenancy start date must not be later than 14 days from today’s date."
before_scheme_end_date: "The tenancy start date must be before the end date for this supported housing scheme."
after_void_date: "Enter a tenancy start date that is after the void date."
after_major_repair_date: "Enter a tenancy start date that is after the major repair date."
year_not_two_or_four_digits: "Tenancy start year must be 2 or 4 digits."
ten_years_after_void_date: "Enter a tenancy start date that is no more than 10 years after the void date."
ten_years_after_mrc_date: "Enter a tenancy start date that is no more than 10 years after the major repairs completion date."
invalid_merged_organisations_start_date:
same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
same_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} and %{managing_organisation} became inactive on %{owning_organisation_merge_date} and were replaced by %{owning_absorbing_organisation}."
owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
different_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
invalid_absorbing_organisations_start_date:
same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became active on %{owning_organisation_available_from}."
owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became active on %{owning_organisation_available_from}."
managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became active on %{managing_organisation_available_from}."
different_organisations: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became active on %{owning_organisation_active_from}, and %{managing_organisation} became active on %{managing_organisation_active_from}."
location:
deactivated:
startdate: "The location %{postcode} is inactive on this date. Enter another date or choose another location."
@ -333,17 +312,7 @@ en:
startdate: "The scheme %{name} has no locations that are active on this date. Enter another date or choose another scheme."
scheme_id: "The scheme %{name} has no locations that are active on this date. Enter another date or choose another scheme."
owning_organisation:
invalid: "Please select the owning organisation or managing organisation that you belong to."
data_sharing_agreement_not_signed: "The organisation must accept the Data Sharing Agreement before it can be selected as the owning organisation."
inactive_merged_organisation: "The owning organisation must be active on the tenancy start date. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
inactive_absorbing_organisation: "The owning organisation must be active on the tenancy start date. %{owning_organisation} became active on %{owning_organisation_available_from}."
managing_organisation:
invalid: "Please select the owning organisation or managing organisation that you belong to."
data_sharing_agreement_not_signed: "The organisation must accept the Data Sharing Agreement before it can be selected as the managing organisation."
inactive_merged_organisation: "The managing organisation must be active on the tenancy start date. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
inactive_absorbing_organisation: "The managing organisation must be active on the tenancy start date. %{managing_organisation} became active on %{managing_organisation_available_from}."
assigned_to:
invalid: "Please select the owning organisation or managing organisation that you belong to."
lettype:
general_needs_mismatch: "Lettings type must be a general needs type because you selected general needs when uploading the file."
supported_housing_mismatch: "Lettings type must be a supported housing type because you selected supported housing when uploading the file."
@ -352,25 +321,12 @@ en:
needstype:
lettype_not_general_needs: "This letting type is supported housing, but the needs type is general needs. Change either the needs type or the letting type."
lettype_not_supported_housing: "This letting type is general needs, but the needs type is supported housing. Change either the needs type or the letting type."
location:
incomplete: "This location is incomplete. Select another location or update this one."
scheme:
incomplete: "This scheme is incomplete. Select another scheme or update this one."
property:
uprn:
invalid: "UPRN must be 12 digits or less."
uprn_known:
invalid: "You must answer UPRN known?"
mrcdate:
before_tenancy_start: "Enter a major repairs date that is before the tenancy start date."
not_first_let: "Major repairs date must not be completed if the tenancy is a first let."
ten_years_before_tenancy_start: "Enter a major repairs completion date that is no more than 10 years before the tenancy start date."
before_void_date: "Major repairs date must be after the void date if provided."
void_date:
ten_years_before_tenancy_start: "Enter a void date no more than 10 years before the tenancy start date."
before_tenancy_start: "Enter a void date that is before the tenancy start date."
after_mrcdate: "Void date must be before the major repairs date if provided."
la:
la_invalid_for_org: "%{org_name} does not operate in %{la_name}."
postcode_invalid_for_org: "Enter a postcode in an area covered by %{org_name}."
@ -616,7 +572,6 @@ en:
during_deactivated_period: "The scheme is already deactivated during this date, please enter a different date."
owning_organisation:
does_not_own_stock: "Enter an organisation that owns housing stock."
no_completed_locations: "This scheme cannot be chosen as it has no completed locations."
location:
postcode_blank: "Enter a postcode."
@ -754,7 +709,6 @@ Make sure these answers are correct."
stairowned:
one: "What percentage of the property does the buyer now own in total?"
other: "What percentage of the property do the buyers now own in total?"
offered: "How many times was the property offered between becoming vacant and this letting?"
hints:
location:
@ -767,7 +721,6 @@ Make sure these answers are correct."
toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed."
bulk_upload:
needstype: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
offered: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
check_answer_labels:
soctenant:
@ -776,7 +729,6 @@ Make sure these answers are correct."
stairowned:
one: "Percentage the buyer now owns in total."
other: "Percentage the buyers now own in total."
offered: "Times previously offered since becoming available."
warnings:
organisation:

63
config/locales/forms/2023/lettings/guidance.en.yml

@ -0,0 +1,63 @@
en:
forms:
2023:
lettings:
guidance:
finding_location:
title: "What is a location?"
content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode."
scheme_changes_link_text: "Read more about schemes and locations"
finding_scheme:
title: "Can’t find your scheme?"
content: "<p>Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"</p>
<p>If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.</p>"
scheme_changes_link_text: "Read more about how schemes have changed"
view_schemes_link_text: "View your organisation’s schemes"
privacy_notice_tenant:
content: "Make sure the tenant has seen %{privacy_notice_link} before completing this log."
privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
rent_type_definitions:
title: "Rent type definitions"
content: "<p><b>Affordable Rent:</b> where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).</p>
<p><b>London Affordable Rent:</b> a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.</p>
<p><b>London Living Rent:</b> a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.</p>
<p><b>Rent to Buy: </b> a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.</p>
<p><b>Social Rent:</b> where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.</p>
<p><b>Other intermediate rent:</b> any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.</p>"
scheme_selection:
data_provider:
content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}."
users_page_link_text: "users page"
data_coordinator:
create_scheme_link_text: "Create a new supported housing scheme"
void_date:
title: "What is a void date?"
content: "<p>Date the property was (legally or contractually) available to let, or for:</p>
<ul class=\"govuk-list govuk-list--bullet\">
<li>re-lets: the day after the previous tenant's contract ended</li>
<li>new builds: the day the landlord legally first owned the property (‘completion date’)</li>
<li>new conversions or acquisitions: completion date, or the day after rehabilitation work ended</li>
<li>new leases: the day the landlord got contractual property rights and could let it out to tenants</li>
</ul>"
what_counts_as_income:
title: "What counts as income?"
content: "<p>You should include any income after tax from:</p>
<ul class=\"govuk-list govuk-list--bullet\">
<li>employment</li>
<li>pensions</li>
<li>Universal Credit</li>
</ul>
<p>Don’t include:</p>
<ul class=\"govuk-list govuk-list--bullet\">
<li>National Insurance (NI) contributions and tax</li>
<li>housing benefit</li>
<li>child benefit</li>
<li>council tax support</li>
</ul>"

120
config/locales/forms/2023/lettings/household_situation.en.yml

@ -0,0 +1,120 @@
en:
forms:
2023:
lettings:
household_situation:
layear:
page_header: ""
check_answer_label: "Length of time in local authority area"
hint_text: ""
question_text: "How long has the household continuously lived in the local authority area of the new letting?"
waityear:
page_header: ""
check_answer_label: "Length of time on local authority waiting list"
hint_text: ""
question_text: "How long has the household been on the local authority waiting list for the new letting?"
reason:
reason_for_leaving_last_settled_home_renewal:
page_header: ""
reason:
check_answer_label: "Reason for leaving last settled home"
hint_text: "You told us this letting is a renewal. We have removed some options because of this."
question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
reasonother:
check_answer_label: "Length of time on local authority waiting list"
hint_text: ""
question_text: "How long has the household been on the local authority waiting list for the new letting?"
reason_for_leaving_last_settled_home:
page_header: ""
reason:
check_answer_label: "Reason for leaving last settled home"
hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously."
question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
reasonother:
check_answer_label: ""
hint_text: ""
question_text: "What is the reason?"
prevten:
renewal:
page_header: ""
check_answer_label: "Where was the household immediately before this letting?"
hint_text: "You told us this letting is a renewal. We have removed some options because of this.<br><br>This is where the household was the night before they moved into this new let."
question_text: "Where was the household immediately before this letting?"
not_renewal:
page_header: ""
check_answer_label: "Where was the household immediately before this letting?"
hint_text: "This is where the household was the night before they moved into this new let."
question_text: "Where was the household immediately before this letting?"
homeless:
page_header: ""
check_answer_label: "Household homeless immediately before letting"
hint_text: ""
question_text: "Did the household experience homelessness immediately before this letting?"
previous_postcode:
page_header: ""
ppcodenk:
check_answer_label: ""
hint_text: "This is also known as the household’s ‘last settled home’."
question_text: "Do you know the postcode of the household’s last settled accommodation?"
ppostcode_full:
check_answer_label: "Postcode of household’s last settled accommodation"
hint_text: ""
question_text: "Postcode for the previous accommodation"
previous_local_authority:
page_header: ""
previous_la_known:
check_answer_label: ""
hint_text: "This is also known as the household’s ‘last settled home’."
question_text: "Do you know the local authority of the household’s last settled accommodation?"
prevloc:
check_answer_label: "Location of household’s last settled accommodation"
hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
question_text: "Select a local authority"
reasonpref:
page_header: ""
check_answer_label: "Household given reasonable preference"
hint_text: "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
question_text: "Was the household given ‘reasonable preference’ by the local authority?"
reasonable_preference_reason:
page_header: ""
check_answer_label: "Reason for reasonable preference"
hint_text: "Select all that apply."
question_text: "Why was the household given ‘reasonable preference’?"
letting_allocation:
page_header: ""
check_answer_label: "Allocation system"
hint_text: "Select all that apply."
question_text: "How was this letting allocated?"
referral:
supported_housing:
prp:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: ""
question_text: "What was the source of referral for this letting?"
la:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: "You told us that you are a local authority. We have removed some options because of this."
question_text: "What was the source of referral for this letting?"
general_needs:
prp:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: "You told us that the needs type is general needs. We have removed some options because of this."
question_text: "What was the source of referral for this letting?"
la:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
question_text: "What was the source of referral for this letting?"

104
config/locales/forms/2023/lettings/property_information.en.yml

@ -0,0 +1,104 @@
en:
forms:
2023:
lettings:
property_information:
uprn:
page_header: ""
uprn_known:
check_answer_label: "UPRN known?"
hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.<br><br>The UPRN may not be the same as the property reference assigned by your organisation.<br><br>If you don’t know the UPRN you can enter the address of the property instead on the next screen."
question_text: "Do you know the property's UPRN?"
uprn:
check_answer_label: "UPRN"
hint_text: ""
question_text: "What is the property's UPRN?"
uprn_confirmed:
page_header: "We found an address that might be this property"
check_answer_label: "Is this the right address?"
hint_text: ""
question_text: "Is this the property address?"
address:
page_header: "Q12 - What is the property's address?"
address_line1:
check_answer_label: "Address lines 1 and 2"
hint_text: ""
question_text: "Address line 1"
address_line2:
check_answer_label: ""
hint_text: ""
question_text: "Address line 2 (optional)"
town_or_city:
check_answer_label: "Town or city"
hint_text: ""
question_text: "Town or city"
county:
check_answer_label: "County"
hint_text: ""
question_text: "County (optional)"
postcode_full:
check_answer_label: "Postcode"
hint_text: ""
question_text: "Postcode"
la:
page_header: ""
check_answer_label: "Local authority"
hint_text: ""
question_text: "What is the property’s local authority?"
first_time_property_let_as_social_housing:
page_header: ""
check_answer_label: "First time being let as social-housing?"
hint_text: ""
question_text: "Is this the first time the property has been let as social housing?"
unitletas:
page_header: ""
check_answer_label: "Most recent let type"
hint_text: ""
question_text: "What type was the property most recently let as?"
rsnvac:
page_header: ""
check_answer_label: "Vacancy reason"
hint_text: ""
question_text: "What is the reason for the property being vacant?"
offered:
page_header: ""
check_answer_label: "Times previously offered since becoming available."
hint_text: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
question_text: "How many times was the property offered between becoming vacant and this letting?"
unittype_gn:
page_header: ""
check_answer_label: "Type of unit"
hint_text: ""
question_text: "What type of unit is the property?"
builtype:
page_header: ""
check_answer_label: "Type of building"
hint_text: ""
question_text: "What type of building is the property?"
wchair:
page_header: ""
check_answer_label: "Property built or adapted to wheelchair-user standards"
hint_text: ""
question_text: "Is the property built or adapted to wheelchair-user standards?"
beds:
page_header: ""
check_answer_label: "Number of bedrooms"
hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
question_text: "How many bedrooms does the property have?"
voiddate:
page_header: "Void date"
check_answer_label: "Void date"
hint_text: ""
question_text: "What is the void date?"

47
config/locales/forms/2023/sales/guidance.en.yml

@ -0,0 +1,47 @@
en:
forms:
2023:
sales:
guidance:
shared_ownership_type_definitions:
title: "Shared Ownership Type Definitions"
content: "<p><b>Shared ownership:</b> Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the 2021 model lease for these properties.</p>
<p><b>Shared ownership 2021 model lease:</b> Homes bought using the Affordable Homes Programme 2021 to 2026.</p>
<p><b>Older Persons Shared Ownership:</b> A type of shared ownership for those 55 years and over.</p>
<p><b>Social HomeBuy shared ownership purchase:</b> Tenants of private registered providers purchase their home at discount on Shared Ownership terms.</p>
<p>>Home Ownership for people with Long-Term Disabilities (HOLD):</b> A shared ownership sale for those with long term disabilities.</p>
<p><b>Rent to Buy shared ownership:</b> A sale following a period of discounted rent.</p>
<p><b>Right to Shared Ownership:</b> A sale of a share of a rented home to a tenant using this scheme.</p>
<p><b>London Living Rent shared ownership:</b> A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.</p>"
discounted_ownership_type_definitions:
title: "Discounted Ownership Type Definitions"
content: "<p><b>Right to Acquire (RTA):</b> a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.</p>
<p><b>Preserved Right to Buy (PRTB):</b> a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.</p>
<p><b>Voluntary Right to Buy (VRTB):</b> a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.</p>
<p><b>Right to Buy (RTB):</b> a discounted sale to tenants in this council owned property.</p>
<p><b>Rent to Buy full ownership:</b> a sale on full ownership terms following a period of discounted rent.</p>
<p><b>Social HomeBuy for outright purchase:</b> a discounted sale to tenants of a private registered provider on full ownership terms.</p>
<p><b>Any other equity loan scheme:</b> any scheme, not covered elsewhere, in which a loan is used to purchase equity.</p>"
mortgage_lender:
title: "Can’t find the mortgage lender you’re looking for?"
content: "<ul class=\"govuk-list govuk-list--bullet\">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>Type Other and continue - we’ll ask you to type in your answer in the next question</li>
</ul>"
outright_sale_type_definitions:
title: "Outright sale type definitions"
content: "<p><b>Outright sale:</b> the full purchase of a property, usually with a mortgage or cash.</p>
<p><b>Other sale:</b> any sale which does not fit the criteria of any of the remaining options.</p>"
privacy_notice_buyer_joint_purchase:
content: "Make sure the buyers have seen %{privacy_notice_link} before completing this log."
privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
privacy_notice_buyer:
content: "Make sure the buyer has seen %{privacy_notice_link} before completing this log."
privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"

7
config/locales/forms/2023/sales/soft_validations.en.yml

@ -18,6 +18,7 @@ en:
question_text: "Are you sure this person is retired?"
title_text: "You told us this person is aged %{age} years and retired."
informative_text: "The minimum expected retirement age in England is 66."
old_persons_shared_ownership_value_check:
page_header: ""
check_answer_label: "Shared ownership confirmation"
@ -27,6 +28,7 @@ en:
joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
income1_value_check:
check_answer_label: "Buyer 1 income confirmation"
hint_text: ""
@ -113,12 +115,14 @@ en:
not_joint_purchase:
title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}."
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
wheel_value_check:
page_header: ""
check_answer_label: "Does anyone in the household use a wheelchair?"
hint_text: ""
question_text: "You told us that someone in the household uses a wheelchair."
title_text: "You told us that someone in the household uses a wheelchair."
buyer_livein_value_check:
buyer1:
page_header: ""
@ -134,6 +138,7 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 2 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
student_not_child_value_check:
page_header: ""
check_answer_label: "Student not a child confirmation"
@ -141,6 +146,7 @@ en:
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
informative_text: "Are you sure this person is not a child?"
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"
@ -148,6 +154,7 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"
multiple_partners_value_check:
page_header: ""
check_answer_label: "Multiple partners confirmation"

63
config/locales/forms/2024/lettings/guidance.en.yml

@ -0,0 +1,63 @@
en:
forms:
2024:
lettings:
guidance:
finding_location:
title: "What is a location?"
content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode."
scheme_changes_link_text: "Read more about schemes and locations"
finding_scheme:
title: "Can’t find your scheme?"
content: "<p>Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"</p>
<p>If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.</p>"
scheme_changes_link_text: "Read more about how schemes have changed"
view_schemes_link_text: "View your organisation’s schemes"
privacy_notice_tenant:
content: "Make sure the lead tenant has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
rent_type_definitions:
title: "Rent type definitions"
content: "<p><b>Social Rent:</b> where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.</p>
<p><b>Affordable Rent:</b> where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).</p>
<p><b>London Affordable Rent:</b> a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.</p>
<p><b>Rent to Buy: </b> a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.</p>
<p><b>London Living Rent:</b> a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.</p>
<p><b>Other intermediate rent:</b> any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.</p>"
scheme_selection:
data_provider:
content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}."
users_page_link_text: "users page"
data_coordinator:
create_scheme_link_text: "Create a new supported housing scheme"
void_date:
title: "What is a void date?"
content: "<p>Date the property was (legally or contractually) available to let, or for:</p>
<ul class=\"govuk-list govuk-list--bullet\">
<li>re-lets: the day after the previous tenant's contract ended</li>
<li>new builds: the day the landlord legally first owned the property (‘completion date’)</li>
<li>new conversions or acquisitions: completion date, or the day after rehabilitation work ended</li>
<li>new leases: the day the landlord got contractual property rights and could let it out to tenants</li>
</ul>"
what_counts_as_income:
title: "What counts as income?"
content: "<p>You should include any income after tax from:</p>
<ul class=\"govuk-list govuk-list--bullet\">
<li>employment</li>
<li>pensions</li>
<li>Universal Credit</li>
</ul>
<p>Don’t include:</p>
<ul class=\"govuk-list govuk-list--bullet\">
<li>National Insurance (NI) contributions and tax</li>
<li>housing benefit</li>
<li>child benefit</li>
<li>council tax support</li>
</ul>"

120
config/locales/forms/2024/lettings/household_situation.en.yml

@ -0,0 +1,120 @@
en:
forms:
2024:
lettings:
household_situation:
layear:
page_header: ""
check_answer_label: "Length of time in local authority area"
hint_text: ""
question_text: "How long has the household continuously lived in the local authority area of the new letting?"
waityear:
page_header: ""
check_answer_label: "Length of time on local authority waiting list"
hint_text: ""
question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
reason:
reason_for_leaving_last_settled_home_renewal:
page_header: ""
reason:
check_answer_label: "Reason for leaving last settled home"
hint_text: "You told us this letting is a renewal. We have removed some options because of this."
question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
reasonother:
check_answer_label: "Length of time on local authority waiting list"
hint_text: ""
question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
reason_for_leaving_last_settled_home:
page_header: ""
reason:
check_answer_label: "Reason for leaving last settled home"
hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously."
question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
reasonother:
check_answer_label: ""
hint_text: ""
question_text: "What is the reason?"
prevten:
renewal:
page_header: ""
check_answer_label: "Where was the household immediately before this letting?"
hint_text: "You told us this letting is a renewal. We have removed some options because of this.<br><br>This is where the household was the night before they moved into this new let."
question_text: "Where was the household immediately before this letting?"
not_renewal:
page_header: ""
check_answer_label: "Where was the household immediately before this letting?"
hint_text: "This is where the household was the night before they moved into this new let."
question_text: "Where was the household immediately before this letting?"
homeless:
page_header: ""
check_answer_label: "Household homeless immediately before letting"
hint_text: ""
question_text: "Did the household experience homelessness immediately before this letting?"
previous_postcode:
page_header: ""
ppcodenk:
check_answer_label: ""
hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless."
question_text: "Do you know the postcode of the household’s last settled accommodation?"
ppostcode_full:
check_answer_label: "Postcode of household’s last settled accommodation"
hint_text: ""
question_text: "Postcode for the previous accommodation"
previous_local_authority:
page_header: ""
previous_la_known:
check_answer_label: ""
hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless."
question_text: "Do you know the local authority of the household’s last settled accommodation?"
prevloc:
check_answer_label: "Location of household’s last settled accommodation"
hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
question_text: "Select a local authority"
reasonpref:
page_header: ""
check_answer_label: "Household given reasonable preference"
hint_text: "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’."
question_text: "Was the household given ‘reasonable preference’ by the local authority?"
reasonable_preference_reason:
page_header: ""
check_answer_label: "Reason for reasonable preference"
hint_text: "Select all that apply."
question_text: "Why was the household given ‘reasonable preference’?"
letting_allocation:
page_header: ""
check_answer_label: "Allocation system"
hint_text: "Select all that apply."
question_text: "How was this letting allocated?"
referral:
supported_housing:
prp:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: ""
question_text: "What was the source of referral for this letting?"
la:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: "You told us that you are a local authority. We have removed some options because of this."
question_text: "What was the source of referral for this letting?"
general_needs:
prp:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: "You told us that the needs type is general needs. We have removed some options because of this."
question_text: "What was the source of referral for this letting?"
la:
page_header: ""
check_answer_label: "Source of referral for letting"
hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
question_text: "What was the source of referral for this letting?"

127
config/locales/forms/2024/lettings/property_information.en.yml

@ -0,0 +1,127 @@
en:
forms:
2024:
lettings:
property_information:
first_time_property_let_as_social_housing:
page_header: ""
check_answer_label: "First time being let as social-housing?"
hint_text: ""
question_text: "Is this the first time the property has been let as social housing?"
uprn:
page_header: ""
uprn_known:
check_answer_label: "UPRN known?"
hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.<br><br>The UPRN may not be the same as the property reference assigned by your organisation.<br><br>If you don’t know the UPRN you can enter the address of the property instead on the next screen."
question_text: "Do you know the property's UPRN?"
uprn:
check_answer_label: "UPRN"
hint_text: ""
question_text: "What is the property's UPRN?"
uprn_confirmed:
page_header: "We found an address that might be this property"
check_answer_label: "Is this the right address?"
hint_text: ""
question_text: "Is this the property address?"
address_matcher:
page_header: "Find an address"
address_line1_input:
check_answer_label: "Find address"
hint_text: ""
question_text: "Address line 1"
postcode_full_input:
check_answer_label: ""
hint_text: ""
question_text: "Postcode"
uprn_selection:
page_header: "We found an address that might be this property"
check_answer_label: "Select the correct address"
hint_text: ""
question_text: "Select the correct address"
address:
page_header: "Q12 - What is the property's address?"
address_line1:
check_answer_label: "Address lines 1 and 2"
hint_text: ""
question_text: "Address line 1"
address_line2:
check_answer_label: ""
hint_text: ""
question_text: "Address line 2 (optional)"
town_or_city:
check_answer_label: "Town or city"
hint_text: ""
question_text: "Town or city"
county:
check_answer_label: "County"
hint_text: ""
question_text: "County (optional)"
postcode_full:
check_answer_label: "Postcode"
hint_text: ""
question_text: "Postcode"
la:
page_header: ""
check_answer_label: "Local authority"
hint_text: ""
question_text: "What is the property’s local authority?"
unitletas:
page_header: ""
check_answer_label: "Most recent let type"
hint_text: "This is the rent type of the previous tenancy in this property."
question_text: "What type was the property most recently let as?"
rsnvac:
page_header: ""
check_answer_label: "Vacancy reason"
hint_text: ""
question_text: "What is the reason for the property being vacant?"
unittype_gn:
page_header: ""
check_answer_label: "Type of unit"
hint_text: ""
question_text: "What type of unit is the property?"
builtype:
page_header: ""
check_answer_label: "Type of building"
hint_text: ""
question_text: "What type of building is the property?"
wchair:
page_header: ""
check_answer_label: "Property built or adapted to wheelchair-user standards"
hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
question_text: "Is the property built or adapted to wheelchair-user standards?"
beds:
page_header: ""
check_answer_label: "Number of bedrooms"
hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household."
question_text: "How many bedrooms does the property have?"
voiddate:
page_header: "Void date"
check_answer_label: "Void date"
hint_text: ""
question_text: "What is the void date?"
property_major_repairs:
page_header: ""
majorrepairs:
check_answer_label: "Major repairs carried out during void period"
hint_text: "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
question_text: "Were any major repairs carried out during the void period?"
mrcdate:
check_answer_label: "Completion date of repairs"
hint_text: ""
question_text: "When were the repairs completed?"

46
config/locales/forms/2024/sales/guidance.en.yml

@ -0,0 +1,46 @@
en:
forms:
2024:
sales:
guidance:
shared_ownership_type_definitions:
title: "Shared Ownership Type Definitions"
content: "<p><b>Shared Ownership (old model lease):</b> Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties.</p>
<p><b>Shared Ownership (new model lease):</b> Homes bought using the Affordable Homes Programme 2021 to 2026.</p>
<p><b>Social HomeBuy — shared ownership purchase:</b> Tenants of private registered providers purchase their home at discount on Shared Ownership terms.</p>
<p><b>Home Ownership for people with Long-Term Disabilities (HOLD):</b> A shared ownership sale for those with long term disabilities.</p>
<p><b>Older Persons Shared Ownership:</b> A type of shared ownership for those 55 years and over.</p>
<p><b>Rent to Buy — Shared Ownership:</b> A sale following a period of discounted rent.</p>
<p><b>Right to Shared Ownership (RtSO):</b> A sale of a share of a rented home to a tenant using this scheme.</p>
<p><b>London Living Rent — Shared Ownership:</b> A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.</p>"
discounted_ownership_type_definitions:
title: "Discounted Ownership Type Definitions"
content: "<p><b>Right to Acquire (RTA):</b> a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.</p>
<p><b>Preserved Right to Buy (PRTB):</b> a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.</p>
<p><b>Voluntary Right to Buy (VRTB):</b> a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.</p>
<p><b>Right to Buy (RTB):</b> a discounted sale to tenants in this council owned property.</p>
<p><b>Rent to Buy full ownership:</b> a sale on full ownership terms following a period of discounted rent.</p>
<p><b>Social HomeBuy for outright purchase:</b> a discounted sale to tenants of a private registered provider on full ownership terms.</p>
<p><b>Any other equity loan scheme:</b> any scheme, not covered elsewhere, in which a loan is used to purchase equity.</p>"
mortgage_lender:
title: "Can’t find the mortgage lender you’re looking for?"
content: "<ul class=\"govuk-list govuk-list--bullet\">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>Type Other and continue - we’ll ask you to type in your answer in the next question</li>
</ul>"
outright_sale_type_definitions:
title: "Outright sale type definitions"
content: "<p><b>Outright sale:</b> the full purchase of a property, usually with a mortgage or cash.</p>
<p><b>Other sale:</b> any sale which does not fit the criteria of any of the remaining options.</p>"
privacy_notice_buyer_joint_purchase:
content: "Make sure the buyers have seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
privacy_notice_buyer:
content: "Make sure the buyer has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"

20
config/locales/validations/lettings/date.en.yml

@ -0,0 +1,20 @@
en:
validations:
lettings:
date:
startdate:
after_void_date: "Enter a tenancy start date that is after the void date."
after_major_repair_date: "Enter a tenancy start date that is after the major repair date."
ten_years_after_void_date: "Enter a tenancy start date that is no more than 10 years after the void date."
ten_years_after_mrc_date: "Enter a tenancy start date that is no more than 10 years after the major repairs completion date."
mrcdate:
before_tenancy_start: "Enter a major repairs date that is before the tenancy start date."
not_first_let: "Major repairs date must not be completed if the tenancy is a first let."
ten_years_before_tenancy_start: "Enter a major repairs completion date that is no more than 10 years before the tenancy start date."
before_void_date: "Major repairs date must be after the void date if provided."
void_date:
ten_years_before_tenancy_start: "Enter a void date no more than 10 years before the tenancy start date."
before_tenancy_start: "Enter a void date that is before the tenancy start date."
after_mrcdate: "Void date must be before the major repairs date if provided."

53
config/locales/validations/lettings/setup.en.yml

@ -0,0 +1,53 @@
en:
validations:
lettings:
setup:
startdate:
not_within:
next_two_weeks: "The tenancy start date must not be later than 14 days from today’s date."
must_be_within:
current_collection_year:
"Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
invalid_merged_organisations_start_date:
same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
same_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} and %{managing_organisation} became inactive on %{owning_organisation_merge_date} and were replaced by %{owning_absorbing_organisation}."
owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
different_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
invalid_absorbing_organisations_start_date:
same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became active on %{available_from}."
owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became active on %{available_from}."
managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became active on %{available_from}."
different_organisations: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became active on %{owning_organisation_active_from}, and %{managing_organisation} became active on %{managing_organisation_active_from}."
assigned_to:
invalid: "Please select the owning organisation or managing organisation that you belong to."
owning_organisation:
invalid: "Please select the owning organisation or managing organisation that you belong to."
inactive:
merged_organisation:
"The owning organisation must be active on the tenancy start date. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
absorbing_organisation:
"The owning organisation must be active on the tenancy start date. %{owning_organisation} became active on %{available_from}."
managing_organisation:
invalid: "Please select the owning organisation or managing organisation that you belong to."
data_sharing_agreement_not_signed: "The organisation must accept the Data Sharing Agreement before it can be selected as the managing organisation."
inactive:
merged_organisation:
"The managing organisation must be active on the tenancy start date. %{managing_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
absorbing_organisation:
"The managing organisation must be active on the tenancy start date. %{managing_organisation} became active on %{available_from}."
intermediate_rent_product_name:
blank: "Enter name of other intermediate rent product."
scheme:
incomplete: "This scheme is incomplete. Select another scheme or update this one."
no_completed_locations: "This scheme cannot be chosen as it has no completed locations."
location:
incomplete: "This location is incomplete. Select another location or update this one."

19
spec/features/bulk_upload_lettings_logs_spec.rb

@ -74,6 +74,25 @@ RSpec.describe "Bulk upload lettings log" do
expect(page).to have_content("Upload lettings logs in bulk")
end
it "shows file to large error" do
stub_const("Forms::BulkUploadLettings::UploadYourFile::MAX_FILE_SIZE", 1.bytes)
visit("/lettings-logs")
click_link("Upload lettings logs in bulk")
expect(page).to have_content("Which year")
click_button("Continue")
choose(current_formatted_year)
click_button("Continue")
click_button("Continue")
allow_any_instance_of(Forms::BulkUploadLettings::UploadYourFile).to receive(:`).and_return("text/csv")
attach_file "file", file_fixture("2023_24_lettings_bulk_upload.xlsx")
click_button("Upload")
expect(page).to have_content("File must be 10MB or less. Check your file and delete data that does not need to be uploaded.")
end
end
# rubocop:enable RSpec/AnyInstance

20
spec/features/bulk_upload_sales_logs_spec.rb

@ -71,6 +71,26 @@ RSpec.describe "Bulk upload sales log" do
expect(page).to have_content("Upload sales logs in bulk")
end
it "shows file to large error" do
stub_const("Forms::BulkUploadSales::UploadYourFile::MAX_FILE_SIZE", 1.bytes)
visit("/sales-logs")
click_link("Upload sales logs in bulk")
expect(page).to have_content("Which year")
click_button("Continue")
click_button("Continue")
choose("2023 to 2024")
click_button("Continue")
click_button("Continue")
allow_any_instance_of(Forms::BulkUploadSales::UploadYourFile).to receive(:`).and_return("text/csv")
attach_file "file", file_fixture("2023_24_lettings_bulk_upload.xlsx")
click_button("Upload")
expect(page).to have_content("File must be 10MB or less. Check your file and delete data that does not need to be uploaded.")
end
end
# rubocop:enable RSpec/AnyInstance

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save