Browse Source

Cleanup the form (#1166)

* Remove empty descriptions from pages

* remove empty headers from pages

* Remove redundant subsection assignment from pages

* Remove redundant page assignement from questions

* Remove redundant section assignment from subsections

* Remove redundant form assignments from sections

* Remove empty hint texts from questions

* lint
pull/1168/head
kosiakkatrina 2 years ago committed by GitHub
parent
commit
c339ffda1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/models/form/common/pages/created_by.rb
  2. 3
      app/models/form/common/pages/organisation.rb
  3. 2
      app/models/form/common/questions/created_by_id.rb
  4. 2
      app/models/form/common/questions/owning_organisation_id.rb
  5. 3
      app/models/form/lettings/pages/created_by.rb
  6. 2
      app/models/form/lettings/pages/location.rb
  7. 3
      app/models/form/lettings/pages/managing_organisation.rb
  8. 3
      app/models/form/lettings/pages/needs_type.rb
  9. 3
      app/models/form/lettings/pages/property_reference.rb
  10. 3
      app/models/form/lettings/pages/renewal.rb
  11. 2
      app/models/form/lettings/pages/rent_type.rb
  12. 2
      app/models/form/lettings/pages/scheme.rb
  13. 3
      app/models/form/lettings/pages/stock_owner.rb
  14. 2
      app/models/form/lettings/pages/tenancy_start_date.rb
  15. 3
      app/models/form/lettings/pages/tenant_code.rb
  16. 2
      app/models/form/lettings/questions/created_by_id.rb
  17. 1
      app/models/form/lettings/questions/irproduct_other.rb
  18. 1
      app/models/form/lettings/questions/location_id.rb
  19. 1
      app/models/form/lettings/questions/managing_organisation.rb
  20. 1
      app/models/form/lettings/questions/needs_type.rb
  21. 1
      app/models/form/lettings/questions/property_reference.rb
  22. 2
      app/models/form/lettings/questions/renewal.rb
  23. 2
      app/models/form/lettings/questions/rent_type.rb
  24. 1
      app/models/form/lettings/questions/stock_owner.rb
  25. 1
      app/models/form/lettings/questions/tenancy_start_date.rb
  26. 1
      app/models/form/lettings/questions/tenant_code.rb
  27. 2
      app/models/form/sales/pages/about_deposit_with_discount.rb
  28. 2
      app/models/form/sales/pages/about_deposit_without_discount.rb
  29. 2
      app/models/form/sales/pages/about_price_not_rtb.rb
  30. 2
      app/models/form/sales/pages/about_price_rtb.rb
  31. 2
      app/models/form/sales/pages/about_price_shared_ownership.rb
  32. 2
      app/models/form/sales/pages/about_staircase.rb
  33. 3
      app/models/form/sales/pages/age1.rb
  34. 3
      app/models/form/sales/pages/age2.rb
  35. 3
      app/models/form/sales/pages/armed_forces.rb
  36. 3
      app/models/form/sales/pages/armed_forces_spouse.rb
  37. 3
      app/models/form/sales/pages/buyer1_ethnic_background_arab.rb
  38. 3
      app/models/form/sales/pages/buyer1_ethnic_background_asian.rb
  39. 3
      app/models/form/sales/pages/buyer1_ethnic_background_black.rb
  40. 3
      app/models/form/sales/pages/buyer1_ethnic_background_mixed.rb
  41. 3
      app/models/form/sales/pages/buyer1_ethnic_background_white.rb
  42. 3
      app/models/form/sales/pages/buyer1_ethnic_group.rb
  43. 3
      app/models/form/sales/pages/buyer1_income.rb
  44. 3
      app/models/form/sales/pages/buyer1_income_value_check.rb
  45. 3
      app/models/form/sales/pages/buyer1_live_in_property.rb
  46. 3
      app/models/form/sales/pages/buyer1_mortgage.rb
  47. 2
      app/models/form/sales/pages/buyer1_previous_tenure.rb
  48. 3
      app/models/form/sales/pages/buyer1_working_situation.rb
  49. 3
      app/models/form/sales/pages/buyer2_income.rb
  50. 3
      app/models/form/sales/pages/buyer2_live_in_property.rb
  51. 3
      app/models/form/sales/pages/buyer2_mortgage.rb
  52. 3
      app/models/form/sales/pages/buyer2_relationship_to_buyer1.rb
  53. 3
      app/models/form/sales/pages/buyer2_working_situation.rb
  54. 3
      app/models/form/sales/pages/buyer_company.rb
  55. 3
      app/models/form/sales/pages/buyer_interview.rb
  56. 3
      app/models/form/sales/pages/buyer_live.rb
  57. 3
      app/models/form/sales/pages/buyer_previous.rb
  58. 3
      app/models/form/sales/pages/buyer_still_serving.rb
  59. 3
      app/models/form/sales/pages/buyers_organisations.rb
  60. 3
      app/models/form/sales/pages/deposit_value_check.rb
  61. 3
      app/models/form/sales/pages/discounted_ownership_type.rb
  62. 3
      app/models/form/sales/pages/exchange_date.rb
  63. 3
      app/models/form/sales/pages/gender_identity1.rb
  64. 3
      app/models/form/sales/pages/gender_identity2.rb
  65. 3
      app/models/form/sales/pages/handover_date.rb
  66. 3
      app/models/form/sales/pages/household_disability.rb
  67. 3
      app/models/form/sales/pages/household_wheelchair.rb
  68. 3
      app/models/form/sales/pages/household_wheelchair_check.rb
  69. 3
      app/models/form/sales/pages/housing_benefits.rb
  70. 3
      app/models/form/sales/pages/joint_purchase.rb
  71. 3
      app/models/form/sales/pages/la_nominations.rb
  72. 3
      app/models/form/sales/pages/last_accommodation.rb
  73. 3
      app/models/form/sales/pages/last_accommodation_la.rb
  74. 7
      app/models/form/sales/pages/leasehold_charges.rb
  75. 7
      app/models/form/sales/pages/living_before_purchase.rb
  76. 3
      app/models/form/sales/pages/monthly_rent.rb
  77. 2
      app/models/form/sales/pages/mortgage_amount.rb
  78. 7
      app/models/form/sales/pages/mortgage_length.rb
  79. 3
      app/models/form/sales/pages/mortgage_value_check.rb
  80. 7
      app/models/form/sales/pages/mortgageused.rb
  81. 3
      app/models/form/sales/pages/nationality1.rb
  82. 3
      app/models/form/sales/pages/number_joint_buyers.rb
  83. 3
      app/models/form/sales/pages/number_of_others_in_property.rb
  84. 3
      app/models/form/sales/pages/outright_ownership_type.rb
  85. 3
      app/models/form/sales/pages/ownership_scheme.rb
  86. 3
      app/models/form/sales/pages/person_age.rb
  87. 3
      app/models/form/sales/pages/person_gender_identity.rb
  88. 3
      app/models/form/sales/pages/person_known.rb
  89. 3
      app/models/form/sales/pages/person_relationship_to_buyer_1.rb
  90. 3
      app/models/form/sales/pages/person_working_situation.rb
  91. 2
      app/models/form/sales/pages/previous_bedrooms.rb
  92. 3
      app/models/form/sales/pages/previous_ownership.rb
  93. 2
      app/models/form/sales/pages/privacy_notice.rb
  94. 3
      app/models/form/sales/pages/property_building_type.rb
  95. 3
      app/models/form/sales/pages/property_local_authority.rb
  96. 3
      app/models/form/sales/pages/property_number_of_bedrooms.rb
  97. 3
      app/models/form/sales/pages/property_unit_type.rb
  98. 3
      app/models/form/sales/pages/property_wheelchair_accessible.rb
  99. 3
      app/models/form/sales/pages/purchase_price.rb
  100. 3
      app/models/form/sales/pages/purchaser_code.rb
  101. Some files were not shown because too many files have changed in this diff Show More

3
app/models/form/common/pages/created_by.rb

@ -2,9 +2,6 @@ class Form::Common::Pages::CreatedBy < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "created_by"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/common/pages/organisation.rb

@ -2,9 +2,6 @@ class Form::Common::Pages::Organisation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "organisation"
@header = ""
@description = ""
@subsection = subsection
end
def questions

2
app/models/form/common/questions/created_by_id.rb

@ -4,9 +4,7 @@ class Form::Common::Questions::CreatedById < ::Form::Question
@id = "created_by_id"
@check_answer_label = "User"
@header = "Which user are you creating this log for?"
@hint_text = ""
@type = "select"
@page = page
end
def answer_options

2
app/models/form/common/questions/owning_organisation_id.rb

@ -4,9 +4,7 @@ class Form::Common::Questions::OwningOrganisationId < ::Form::Question
@id = "owning_organisation_id"
@check_answer_label = "Owning organisation"
@header = "Which organisation owns this log?"
@hint_text = ""
@type = "select"
@page = page
end
def answer_options

3
app/models/form/lettings/pages/created_by.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::CreatedBy < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "created_by"
@header = ""
@description = ""
@subsection = subsection
end
def questions

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

@ -1,8 +1,6 @@
class Form::Lettings::Pages::Location < ::Form::Page
def initialize(_id, hsh, subsection)
super("location", hsh, subsection)
@header = ""
@description = ""
@depends_on = [{
"needstype" => 2,
"scheme_has_multiple_locations?" => true,

3
app/models/form/lettings/pages/managing_organisation.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::ManagingOrganisation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "managing_organisation"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/lettings/pages/needs_type.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::NeedsType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "needs_type"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/lettings/pages/property_reference.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::PropertyReference < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_reference"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/lettings/pages/renewal.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::Renewal < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "renewal"
@header = ""
@description = ""
@subsection = subsection
end
def questions

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

@ -1,8 +1,6 @@
class Form::Lettings::Pages::RentType < ::Form::Page
def initialize(_id, hsh, subsection)
super("rent_type", hsh, subsection)
@header = ""
@description = ""
@derived = true
end

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

@ -1,8 +1,6 @@
class Form::Lettings::Pages::Scheme < ::Form::Page
def initialize(_id, hsh, subsection)
super("scheme", hsh, subsection)
@header = ""
@description = ""
@depends_on = [{
"needstype" => 2,
}]

3
app/models/form/lettings/pages/stock_owner.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::StockOwner < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "stock_owner"
@header = ""
@description = ""
@subsection = subsection
end
def questions

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

@ -2,8 +2,6 @@ class Form::Lettings::Pages::TenancyStartDate < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "tenancy_start_date"
@description = ""
@subsection = subsection
@next_unresolved_page_id = "scheme"
end

3
app/models/form/lettings/pages/tenant_code.rb

@ -2,9 +2,6 @@ class Form::Lettings::Pages::TenantCode < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "tenant_code"
@header = ""
@description = ""
@subsection = subsection
end
def questions

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

@ -4,9 +4,7 @@ class Form::Lettings::Questions::CreatedById < ::Form::Question
@id = "created_by_id"
@check_answer_label = "Log owner"
@header = "Which user are you creating this log for?"
@hint_text = ""
@type = "select"
@page = page
end
def answer_options

1
app/models/form/lettings/questions/irproduct_other.rb

@ -5,6 +5,5 @@ class Form::Lettings::Questions::IrproductOther < ::Form::Question
@check_answer_label = "Product name"
@header = "Name of rent product"
@type = "text"
@page = page
end
end

1
app/models/form/lettings/questions/location_id.rb

@ -3,7 +3,6 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
super("location_id", hsh, page)
@check_answer_label = "Location"
@header = "Which location is this log for?"
@hint_text = ""
@type = "radio"
@answer_options = answer_options
@inferred_answers = {

1
app/models/form/lettings/questions/managing_organisation.rb

@ -8,7 +8,6 @@ class Form::Lettings::Questions::ManagingOrganisation < ::Form::Question
@header = "Which organisation manages this letting?"
@type = "select"
@answer_options = answer_options
@page = page
end
def answer_options

1
app/models/form/lettings/questions/needs_type.rb

@ -7,7 +7,6 @@ class Form::Lettings::Questions::NeedsType < ::Form::Question
@hint_text = "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."
@type = "radio"
@answer_options = ANSWER_OPTIONS
@page = page
end
ANSWER_OPTIONS = {

1
app/models/form/lettings/questions/property_reference.rb

@ -7,6 +7,5 @@ class Form::Lettings::Questions::PropertyReference < ::Form::Question
@hint_text = "This is how you usually refer to this property on your own systems."
@type = "text"
@width = 10
@page = page
end
end

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

@ -4,10 +4,8 @@ class Form::Lettings::Questions::Renewal < ::Form::Question
@id = "renewal"
@check_answer_label = "Property renewal"
@header = "Is this letting a renewal?"
@hint_text = ""
@type = "radio"
@answer_options = ANSWER_OPTIONS
@page = page
end
ANSWER_OPTIONS = {

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

@ -4,11 +4,9 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@id = "rent_type"
@check_answer_label = "Rent type"
@header = "What is the rent type?"
@hint_text = ""
@type = "radio"
@answer_options = ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] }
@page = page
end
ANSWER_OPTIONS = {

1
app/models/form/lettings/questions/stock_owner.rb

@ -7,7 +7,6 @@ class Form::Lettings::Questions::StockOwner < ::Form::Question
@check_answer_label = "Stock owner"
@header = "Which organisation owns this property?"
@type = "select"
@page = page
end
def answer_options

1
app/models/form/lettings/questions/tenancy_start_date.rb

@ -6,6 +6,5 @@ class Form::Lettings::Questions::TenancyStartDate < ::Form::Question
@header = "What is the tenancy start date?"
@type = "date"
@unresolved_hint_text = "Some scheme details have changed, and now this log needs updating. Check that the tenancy start date is correct."
@page = page
end
end

1
app/models/form/lettings/questions/tenant_code.rb

@ -7,6 +7,5 @@ class Form::Lettings::Questions::TenantCode < ::Form::Question
@hint_text = "This is how you usually refer to this tenancy on your own systems."
@type = "text"
@width = 10
@page = page
end
end

2
app/models/form/sales/pages/about_deposit_with_discount.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::AboutDepositWithDiscount < ::Form::Page
super
@id = "about_deposit_with_discount"
@header = "About the deposit"
@description = ""
@subsection = subsection
@depends_on = [{ "is_type_discount?" => true }]
end

2
app/models/form/sales/pages/about_deposit_without_discount.rb

@ -2,8 +2,6 @@ class Form::Sales::Pages::AboutDepositWithoutDiscount < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = "About the deposit"
@description = ""
@subsection = subsection
@depends_on = [{ "is_type_discount?" => false }]
end

2
app/models/form/sales/pages/about_price_not_rtb.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::AboutPriceNotRtb < ::Form::Page
super
@id = "about_price_not_rtb"
@header = "About the price of the property"
@description = ""
@subsection = subsection
@depends_on = [{
"right_to_buy?" => false,
}]

2
app/models/form/sales/pages/about_price_rtb.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::AboutPriceRtb < ::Form::Page
super
@id = "about_price_rtb"
@header = "About the price of the property"
@description = ""
@subsection = subsection
@depends_on = [{
"right_to_buy?" => true,
}]

2
app/models/form/sales/pages/about_price_shared_ownership.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::AboutPriceSharedOwnership < ::Form::Page
super
@id = "about_price_shared_ownership"
@header = "About the price of the property"
@description = ""
@subsection = subsection
end
def questions

2
app/models/form/sales/pages/about_staircase.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::AboutStaircase < ::Form::Page
super
@id = "about_staircasing"
@header = "About the staircasing transaction"
@description = ""
@subsection = subsection
@depends_on = [{
"staircase" => 1,
}]

3
app/models/form/sales/pages/age1.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Age1 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_age"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/age2.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Age2 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_age"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/armed_forces.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::ArmedForces < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "armed_forces"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/armed_forces_spouse.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::ArmedForcesSpouse < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "armed_forces_spouse"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer1_ethnic_background_arab.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1EthnicBackgroundArab < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_ethnic_background_arab"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ethnic_group" => 4,
}]

3
app/models/form/sales/pages/buyer1_ethnic_background_asian.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1EthnicBackgroundAsian < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_ethnic_background_asian"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ethnic_group" => 2,
}]

3
app/models/form/sales/pages/buyer1_ethnic_background_black.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1EthnicBackgroundBlack < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_ethnic_background_black"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ethnic_group" => 3,
}]

3
app/models/form/sales/pages/buyer1_ethnic_background_mixed.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1EthnicBackgroundMixed < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_ethnic_background_mixed"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ethnic_group" => 1,
}]

3
app/models/form/sales/pages/buyer1_ethnic_background_white.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1EthnicBackgroundWhite < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_ethnic_background_white"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ethnic_group" => 0,
}]

3
app/models/form/sales/pages/buyer1_ethnic_group.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1EthnicGroup < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_ethnic_group"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer1_income.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1Income < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_income"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer1_income_value_check.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::Buyer1IncomeValueCheck < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{
"income1_under_soft_min?" => true,

3
app/models/form/sales/pages/buyer1_live_in_property.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1LiveInProperty < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_live_in_property"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer1_mortgage.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1Mortgage < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_mortgage"
@header = ""
@description = ""
@subsection = subsection
end
def questions

2
app/models/form/sales/pages/buyer1_previous_tenure.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::Buyer1PreviousTenure < ::Form::Page
super
@id = "buyer1_previous_tenure"
@header = "What was buyer 1's previous tenure?"
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer1_working_situation.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer1WorkingSituation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_working_situation"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer2_income.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer2Income < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_income"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/buyer2_live_in_property.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer2LiveInProperty < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_live_in_property"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/buyer2_mortgage.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer2Mortgage < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_mortgage"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{ "jointpur" => 1 }]
end

3
app/models/form/sales/pages/buyer2_relationship_to_buyer1.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer2RelationshipToBuyer1 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_relationship_to_buyer_1"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/buyer2_working_situation.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Buyer2WorkingSituation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_working_situation"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/buyer_company.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::BuyerCompany < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_company"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ownershipsch" => 3,
}]

3
app/models/form/sales/pages/buyer_interview.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::BuyerInterview < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_interview"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer_live.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::BuyerLive < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_live"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"companybuy" => 2,
}]

3
app/models/form/sales/pages/buyer_previous.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::BuyerPrevious < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_previous"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/buyer_still_serving.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::BuyerStillServing < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_still_serving"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"hhregres" => 1,
}]

3
app/models/form/sales/pages/buyers_organisations.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::BuyersOrganisations < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyers_organisations"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/deposit_value_check.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::DepositValueCheck < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{
"deposit_over_soft_max?" => true,

3
app/models/form/sales/pages/discounted_ownership_type.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::DiscountedOwnershipType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "discounted_ownership_type"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ownershipsch" => 2,
}]

3
app/models/form/sales/pages/exchange_date.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::ExchangeDate < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "exchange_contracts"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"resale" => 2,
}]

3
app/models/form/sales/pages/gender_identity1.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::GenderIdentity1 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_gender_identity"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/gender_identity2.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::GenderIdentity2 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_gender_identity"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/handover_date.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::HandoverDate < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "handover_date"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ownershipsch" => 1,
}]

3
app/models/form/sales/pages/household_disability.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::HouseholdDisability < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "household_disability"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/household_wheelchair.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::HouseholdWheelchair < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "household_wheelchair"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/household_wheelchair_check.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::HouseholdWheelchairCheck < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{
"wheelchair_when_not_disabled?" => true,

3
app/models/form/sales/pages/housing_benefits.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::HousingBenefits < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "housing_benefits"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/joint_purchase.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::JointPurchase < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "joint_purchase"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{ "ownershipsch" => 1 },
{ "ownershipsch" => 2 },

3
app/models/form/sales/pages/la_nominations.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::LaNominations < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "la_nominations"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/last_accommodation.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::LastAccommodation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "last_accommodation"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/last_accommodation_la.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::LastAccommodationLa < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "last_accommodation_la"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"is_previous_la_inferred" => false,
}]

7
app/models/form/sales/pages/leasehold_charges.rb

@ -1,11 +1,4 @@
class Form::Sales::Pages::LeaseholdCharges < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
end
def questions
@questions ||= [
Form::Sales::Questions::LeaseholdChargesKnown.new(nil, nil, self),

7
app/models/form/sales/pages/living_before_purchase.rb

@ -1,11 +1,4 @@
class Form::Sales::Pages::LivingBeforePurchase < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
end
def questions
@questions ||= [
Form::Sales::Questions::LivingBeforePurchase.new(nil, nil, self),

3
app/models/form/sales/pages/monthly_rent.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::MonthlyRent < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "monthly_rent"
@header = ""
@description = ""
@subsection = subsection
end
def questions

2
app/models/form/sales/pages/mortgage_amount.rb

@ -2,8 +2,6 @@ class Form::Sales::Pages::MortgageAmount < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = "Mortgage Amount"
@description = ""
@subsection = subsection
@depends_on = [{
"mortgageused" => 1,
}]

7
app/models/form/sales/pages/mortgage_length.rb

@ -1,11 +1,4 @@
class Form::Sales::Pages::MortgageLength < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
end
def questions
@questions ||= [
Form::Sales::Questions::MortgageLength.new(nil, nil, self),

3
app/models/form/sales/pages/mortgage_value_check.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::MortgageValueCheck < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{
"mortgage_over_soft_max?" => true,

7
app/models/form/sales/pages/mortgageused.rb

@ -1,11 +1,4 @@
class Form::Sales::Pages::Mortgageused < ::Form::Page
def initialize(id, hsh, subsection)
super
@header = ""
@description = ""
@subsection = subsection
end
def questions
@questions ||= [
Form::Sales::Questions::Mortgageused.new(nil, nil, self),

3
app/models/form/sales/pages/nationality1.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::Nationality1 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_nationality"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/number_joint_buyers.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::NumberJointBuyers < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "number_joint_buyers"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"jointpur" => 1,
}]

3
app/models/form/sales/pages/number_of_others_in_property.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::NumberOfOthersInProperty < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "number_of_others_in_property"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/outright_ownership_type.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::OutrightOwnershipType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "outright_ownership_type"
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ownershipsch" => 3,
}]

3
app/models/form/sales/pages/ownership_scheme.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::OwnershipScheme < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "ownership_scheme"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/person_age.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::PersonAge < Form::Sales::Pages::Person
def initialize(id, hsh, subsection, person_index:)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{ details_known_question_id => 1, "jointpur" => joint_purchase? ? 1 : 2 }]
end

3
app/models/form/sales/pages/person_gender_identity.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::PersonGenderIdentity < Form::Sales::Pages::Person
def initialize(id, hsh, subsection, person_index:)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{ details_known_question_id => 1, "jointpur" => joint_purchase? ? 1 : 2 },
]

3
app/models/form/sales/pages/person_known.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PersonKnown < Form::Sales::Pages::Person
def initialize(id, hsh, subsection, person_index:)
super
@header_partial = "person_#{person_display_number}_known_page"
@header = ""
@description = ""
@subsection = subsection
@depends_on = (person_display_number..4).map { |index| { "hholdcount" => index, "jointpur" => joint_purchase? ? 1 : 2 } }
end

3
app/models/form/sales/pages/person_relationship_to_buyer_1.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::PersonRelationshipToBuyer1 < ::Form::Sales::Pages::Person
def initialize(id, hsh, subsection, person_index:)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [
{ details_known_question_id => 1, "jointpur" => joint_purchase? ? 1 : 2 },
]

3
app/models/form/sales/pages/person_working_situation.rb

@ -1,9 +1,6 @@
class Form::Sales::Pages::PersonWorkingSituation < Form::Sales::Pages::Person
def initialize(id, hsh, subsection, person_index:)
super
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{ details_known_question_id => 1, "jointpur" => joint_purchase? ? 1 : 2 }]
end

2
app/models/form/sales/pages/previous_bedrooms.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::PreviousBedrooms < ::Form::Page
super
@id = "previous_bedrooms"
@header = "About the buyers’ previous property"
@description = ""
@subsection = subsection
@depends_on = [{
"soctenant" => 1,
}]

3
app/models/form/sales/pages/previous_ownership.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PreviousOwnership < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "previous_ownership"
@header = ""
@description = ""
@subsection = subsection
end
def questions

2
app/models/form/sales/pages/privacy_notice.rb

@ -3,8 +3,6 @@ class Form::Sales::Pages::PrivacyNotice < ::Form::Page
super
@id = "privacy_notice"
@header = "Department for Levelling Up, Housing and Communities privacy notice"
@description = ""
@subsection = subsection
@depends_on = [{
"noint" => 2,
}]

3
app/models/form/sales/pages/property_building_type.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PropertyBuildingType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_building_type"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/property_local_authority.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PropertyLocalAuthority < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_local_authority"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/property_number_of_bedrooms.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PropertyNumberOfBedrooms < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_number_of_bedrooms"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/property_unit_type.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PropertyUnitType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_unit_type"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/property_wheelchair_accessible.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PropertyWheelchairAccessible < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_wheelchair_accessible"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/purchase_price.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PurchasePrice < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "purchase_price"
@header = ""
@description = ""
@subsection = subsection
end
def questions

3
app/models/form/sales/pages/purchaser_code.rb

@ -2,9 +2,6 @@ class Form::Sales::Pages::PurchaserCode < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "purchaser_code"
@header = ""
@description = ""
@subsection = subsection
end
def questions

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

Loading…
Cancel
Save