Browse Source
* Spike for generating form * Add remaining field mappings * Add question attributes conditionally * Display page attributes conditionally * update subsection formatting * Update section formatting * fix generator * Fix generator * Update the form handler and form to create post 2021 forms programatically * Initially generated and linted form * Cover lettings sections and subsections wiht tests * Cover age pages and questions with tests * Add reusable age questions and adjust the tests * Add a generic person age page using generic questions and adjust specs * Multiline arrays in subsections * Use generic person age page in household characteristics and remove unused pages/questions * Combine and reduce tests * Backfill duplicate rsnvac question * Backfill repeating question * Backfill repeating voiddate * Backfill repeating tenancy question * Backfill ethnic questions * Backfill reason question * Backfill prevten question * Backfill referral questions * Backfill chcharges questions * Backfill brent questions * Backfill scharge * Backfill pscharge * Backfill supcharg * Backfill tcharge * Backfill retirement value check question * Make person known questions generic * Make person gender identity questions generic * Make relationship questions generic * Make working situation questions generic * make retirement check generic * make pregnant household check generic * Make pregnancy value checks generic, again * Undo for and form handler changes * Remove generate form task and service * Remove empty headers, descriptions and initializers from pages * Fix tests * lintpull/1264/head
kosiakkatrina
2 years ago
committed by
GitHub
257 changed files with 6849 additions and 27 deletions
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::AccessNeedsExist < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Housingneeds.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::AllocationSystem < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::LettingAllocation.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::ArmedForces < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Armedforces.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ArmedForcesInjured < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "armed_forces_injured" |
||||
@depends_on = [{ "armedforces" => 1 }, { "armedforces" => 4 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Reservist.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ArmedForcesServing < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "armed_forces_serving" |
||||
@depends_on = [{ "armedforces" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Leftreg.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::BenefitsProportion < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Benefits.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,17 @@
|
||||
class Form::Lettings::Pages::CareHome4Weekly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "care_home_4_weekly" |
||||
@depends_on = [ |
||||
{ "period" => 3, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 3, "needstype" => 2, "household_charge" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::IsCarehome.new(nil, nil, self), |
||||
Form::Lettings::Questions::Chcharge4Weekly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,17 @@
|
||||
class Form::Lettings::Pages::CareHomeBiWeekly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "care_home_bi_weekly" |
||||
@depends_on = [ |
||||
{ "period" => 2, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 2, "needstype" => 2, "household_charge" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::IsCarehome.new(nil, nil, self), |
||||
Form::Lettings::Questions::ChchargeBiWeekly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,17 @@
|
||||
class Form::Lettings::Pages::CareHomeMonthly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "care_home_monthly" |
||||
@depends_on = [ |
||||
{ "period" => 4, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 4, "needstype" => 2, "household_charge" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::IsCarehome.new(nil, nil, self), |
||||
Form::Lettings::Questions::ChchargeMonthly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,27 @@
|
||||
class Form::Lettings::Pages::CareHomeWeekly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "care_home_weekly" |
||||
@depends_on = [ |
||||
{ "period" => 1, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 1, "needstype" => 2, "household_charge" => nil }, |
||||
{ "period" => 5, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 5, "needstype" => 2, "household_charge" => nil }, |
||||
{ "period" => 6, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 6, "needstype" => 2, "household_charge" => nil }, |
||||
{ "period" => 7, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 7, "needstype" => 2, "household_charge" => nil }, |
||||
{ "period" => 8, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 8, "needstype" => 2, "household_charge" => nil }, |
||||
{ "period" => 9, "needstype" => 2, "household_charge" => 0 }, |
||||
{ "period" => 9, "needstype" => 2, "household_charge" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::IsCarehome.new(nil, nil, self), |
||||
Form::Lettings::Questions::ChchargeWeekly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::Declaration < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "declaration" |
||||
@header = "Department for Levelling Up, Housing & Communities privacy notice" |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Declaration.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadAgeValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "females_in_soft_age_range_in_pregnant_household_lead_age_value_check" |
||||
@depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.females_not_in_soft_age_range", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadHhmembValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check" |
||||
@depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.females_not_in_soft_age_range", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "females_in_soft_age_range_in_pregnant_household_lead_value_check" |
||||
@depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.females_not_in_soft_age_range", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,36 @@
|
||||
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "females_in_soft_age_range_in_pregnant_household_person_#{person_index}_age_value_check" |
||||
@depends_on = [ |
||||
{ |
||||
"female_in_pregnant_household_in_soft_validation_range?" => true, |
||||
"age#{person_index}_known" => 0, |
||||
}, |
||||
] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "sex1", |
||||
"label" => true, |
||||
"i18n_template" => "sex1", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.females_not_in_soft_age_range", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "sex1", |
||||
"label" => true, |
||||
"i18n_template" => "sex1", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,36 @@
|
||||
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "females_in_soft_age_range_in_pregnant_household_person_#{person_index}_value_check" |
||||
@depends_on = [ |
||||
{ |
||||
"female_in_pregnant_household_in_soft_validation_range?" => true, |
||||
"details_known_#{person_index}" => 0, |
||||
}, |
||||
] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "sex1", |
||||
"label" => true, |
||||
"i18n_template" => "sex1", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.females_not_in_soft_age_range", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "sex1", |
||||
"label" => true, |
||||
"i18n_template" => "sex1", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "females_in_soft_age_range_in_pregnant_household_value_check" |
||||
@depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.females_not_in_soft_age_range", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::FirstTimePropertyLetAsSocialHousing < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "first_time_property_let_as_social_housing" |
||||
@depends_on = [{ "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::HealthConditionEffects < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "health_condition_effects" |
||||
@depends_on = [{ "illness" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::ConditionEffects.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::HealthConditions < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Illness.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::Homelessness < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Homeless.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::HouseholdMembers < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "household_members" |
||||
@depends_on = [{ "declaration" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Hhmemb.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::HousingBenefit < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Hb.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,15 @@
|
||||
class Form::Lettings::Pages::IncomeAmount < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "income_amount" |
||||
@header = "Total household income" |
||||
@depends_on = [{ "net_income_known" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Earnings.new(nil, nil, self), |
||||
Form::Lettings::Questions::Incfreq.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::IncomeKnown < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "income_known" |
||||
@header = "Household’s combined income after tax" |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::NetIncomeKnown.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::Joint < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Joint.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::LeadTenantAge < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_age" |
||||
@depends_on = [{ "declaration" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Age1Known.new(nil, nil, self), |
||||
Form::Lettings::Questions::Age1.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantEthnicBackgroundArab < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_ethnic_background_arab" |
||||
@depends_on = [{ "ethnic_group" => 4 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::EthnicArab.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantEthnicBackgroundAsian < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_ethnic_background_asian" |
||||
@depends_on = [{ "ethnic_group" => 2 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::EthnicAsian.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantEthnicBackgroundBlack < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_ethnic_background_black" |
||||
@depends_on = [{ "ethnic_group" => 3 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::EthnicBlack.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantEthnicBackgroundMixed < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_ethnic_background_mixed" |
||||
@depends_on = [{ "ethnic_group" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::EthnicMixed.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_ethnic_background_white" |
||||
@depends_on = [{ "ethnic_group" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::EthnicWhite.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantEthnicGroup < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_ethnic_group" |
||||
@depends_on = [{ "declaration" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::EthnicGroup.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantGenderIdentity < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_gender_identity" |
||||
@depends_on = [{ "declaration" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::GenderIdentity1.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantNationality < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_nationality" |
||||
@depends_on = [{ "declaration" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::National.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,32 @@
|
||||
class Form::Lettings::Pages::LeadTenantOverRetirementValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_over_retirement_value_check" |
||||
@depends_on = [{ "person_1_not_retired_over_soft_max_age?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.retirement.max.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.retirement.max.hint_text", |
||||
"arguments" => [ |
||||
{ "key" => "plural_gender_for_person_1", "label" => false, "i18n_template" => "gender" }, |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::RetirementValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,32 @@
|
||||
class Form::Lettings::Pages::LeadTenantUnderRetirementValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_under_retirement_value_check" |
||||
@depends_on = [{ "person_1_retired_under_soft_min_age?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ "key" => "plural_gender_for_person_1", "label" => false, "i18n_template" => "gender" }, |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::NoRetirementValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::LeadTenantWorkingSituation < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "lead_tenant_working_situation" |
||||
@depends_on = [{ "declaration" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::WorkingSituation1.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,25 @@
|
||||
class Form::Lettings::Pages::MaxRentValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "max_rent_value_check" |
||||
@depends_on = [{ "rent_in_soft_max_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.rent.max.title_text", |
||||
"arguments" => [{ "key" => "brent", "label" => true, "i18n_template" => "brent" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.rent.max.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "soft_max_for_period", |
||||
"label" => false, |
||||
"i18n_template" => "soft_max_for_period", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::RentValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,25 @@
|
||||
class Form::Lettings::Pages::MinRentValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "min_rent_value_check" |
||||
@depends_on = [{ "rent_in_soft_min_range?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.rent.min.title_text", |
||||
"arguments" => [{ "key" => "brent", "label" => true, "i18n_template" => "brent" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.rent.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "soft_min_for_period", |
||||
"label" => false, |
||||
"i18n_template" => "soft_min_for_period", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::RentValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NetIncomeValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "net_income_value_check" |
||||
@depends_on = [{ "net_income_soft_validation_triggered?" => true }] |
||||
@title_text = { "translation" => "soft_validations.net_income.title_text" } |
||||
@informative_text = { |
||||
"translation" => "soft_validations.net_income.hint_text", |
||||
"arguments" => [ |
||||
{ "key" => "ecstat1", "label" => true, "i18n_template" => "ecstat1" }, |
||||
{ "key" => "earnings", "label" => true, "i18n_template" => "earnings" }, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::NetIncomeValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,15 @@
|
||||
class Form::Lettings::Pages::NewBuildHandoverDate < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "new_build_handover_date" |
||||
@depends_on = [ |
||||
{ "renewal" => 0, "rsnvac" => 15 }, |
||||
{ "renewal" => 0, "rsnvac" => 16 }, |
||||
{ "renewal" => 0, "rsnvac" => 17 }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::VoiddateNewBuild.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadAgeValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "no_females_pregnant_household_lead_age_value_check" |
||||
@depends_on = [{ "no_females_in_a_pregnant_household?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.no_females", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadHhmembValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "no_females_pregnant_household_lead_hhmemb_value_check" |
||||
@depends_on = [{ "no_females_in_a_pregnant_household?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.no_females", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "no_females_pregnant_household_lead_value_check" |
||||
@depends_on = [{ "no_females_in_a_pregnant_household?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.no_females", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "no_females_pregnant_household_person_#{person_index}_age_value_check" |
||||
@depends_on = [{ "no_females_in_a_pregnant_household?" => true, "age#{person_index}_known" => 0 }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.no_females", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "no_females_pregnant_household_person_#{person_index}_value_check" |
||||
@depends_on = [{ "no_females_in_a_pregnant_household?" => true, "details_known_#{person_index}" => 0 }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.no_females", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,19 @@
|
||||
class Form::Lettings::Pages::NoFemalesPregnantHouseholdValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "no_females_pregnant_household_value_check" |
||||
@depends_on = [{ "no_females_in_a_pregnant_household?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.pregnancy.title", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.pregnancy.no_females", |
||||
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,16 @@
|
||||
class Form::Lettings::Pages::Outstanding < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "outstanding" |
||||
@depends_on = [ |
||||
{ "hb" => 1, "household_charge" => 0 }, |
||||
{ "hb" => 1, "household_charge" => nil }, |
||||
{ "hb" => 6, "household_charge" => 0 }, |
||||
{ "hb" => 6, "household_charge" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Hbrentshortfall.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::OutstandingAmount < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "outstanding_amount" |
||||
@depends_on = [{ "hb" => 1, "hbrentshortfall" => 1 }, { "hb" => 6, "hbrentshortfall" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::TshortfallKnown.new(nil, nil, self), |
||||
Form::Lettings::Questions::Tshortfall.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,15 @@
|
||||
class Form::Lettings::Pages::PersonAge < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_age" |
||||
@depends_on = [{ "details_known_#{person_index}" => 0 }] |
||||
@person_index = person_index |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::AgeKnown.new(nil, nil, self, person_index: @person_index), |
||||
Form::Lettings::Questions::Age.new(nil, nil, self, person_index: @person_index), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,12 @@
|
||||
class Form::Lettings::Pages::PersonGenderIdentity < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_gender_identity" |
||||
@depends_on = [{ "details_known_#{person_index}" => 0 }] |
||||
@person_index = person_index |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PersonGenderIdentity.new(nil, nil, self, person_index: @person_index)] |
||||
end |
||||
end |
@ -0,0 +1,13 @@
|
||||
class Form::Lettings::Pages::PersonKnown < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_known" |
||||
@header = "You’ve given us the details for #{person_index - 1} person in the household" |
||||
@depends_on = (person_index..8).map { |index| { "hhmemb" => index } } |
||||
@person_index = person_index |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::DetailsKnown.new(nil, nil, self, person_index: @person_index)] |
||||
end |
||||
end |
@ -0,0 +1,36 @@
|
||||
class Form::Lettings::Pages::PersonOverRetirementValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_over_retirement_value_check" |
||||
@depends_on = [{ "person_#{person_index}_not_retired_over_soft_max_age?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.retirement.max.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.retirement.max.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::RetirementValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,12 @@
|
||||
class Form::Lettings::Pages::PersonRelationshipToLead < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_relationship_to_lead" |
||||
@depends_on = [{ "details_known_#{person_index}" => 0 }] |
||||
@person_index = person_index |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PersonRelationship.new(nil, nil, self, person_index: @person_index)] |
||||
end |
||||
end |
@ -0,0 +1,36 @@
|
||||
class Form::Lettings::Pages::PersonUnderRetirementValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_under_retirement_value_check" |
||||
@depends_on = [{ "person_#{person_index}_retired_under_soft_min_age?" => true }] |
||||
@title_text = { |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::NoRetirementValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,21 @@
|
||||
class Form::Lettings::Pages::PersonWorkingSituation < ::Form::Page |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super(id, hsh, subsection) |
||||
@id = "person_#{person_index}_working_situation" |
||||
@depends_on = [ |
||||
{ |
||||
"details_known_#{person_index}" => 0, |
||||
"age#{person_index}" => { |
||||
"operator" => ">", |
||||
"operand" => 15, |
||||
}, |
||||
}, |
||||
{ "details_known_#{person_index}" => 0, "age#{person_index}" => nil }, |
||||
] |
||||
@person_index = person_index |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PersonWorkingSituation.new(nil, nil, self, person_index: @person_index)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::Pregnant < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PregOcc.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PreviousHousingSituation < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "previous_housing_situation" |
||||
@depends_on = [{ "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Prevten.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PreviousHousingSituationRenewal < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "previous_housing_situation_renewal" |
||||
@depends_on = [{ "renewal" => 1, "needstype" => 2 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::PrevtenRenewal.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::PreviousLocalAuthority < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "previous_local_authority" |
||||
@depends_on = [{ "is_previous_la_inferred" => false }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::PreviousLaKnown.new(nil, nil, self), |
||||
Form::Lettings::Questions::Prevloc.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,8 @@
|
||||
class Form::Lettings::Pages::PreviousPostcode < ::Form::Page |
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Ppcodenk.new(nil, nil, self), |
||||
Form::Lettings::Questions::PpostcodeFull.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyBuildingType < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_building_type" |
||||
@depends_on = [{ "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Builtype.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyLetType < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_let_type" |
||||
@depends_on = [{ "first_time_property_let_as_social_housing" => 0, "renewal" => 0, "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Unitletas.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyLocalAuthority < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_local_authority" |
||||
@depends_on = [{ "is_la_inferred" => false, "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::La.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,25 @@
|
||||
class Form::Lettings::Pages::PropertyMajorRepairs < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_major_repairs" |
||||
@depends_on = [ |
||||
{ "renewal" => 0, "rsnvac" => 5 }, |
||||
{ "renewal" => 0, "rsnvac" => 6 }, |
||||
{ "renewal" => 0, "rsnvac" => 8 }, |
||||
{ "renewal" => 0, "rsnvac" => 9 }, |
||||
{ "renewal" => 0, "rsnvac" => 10 }, |
||||
{ "renewal" => 0, "rsnvac" => 11 }, |
||||
{ "renewal" => 0, "rsnvac" => 12 }, |
||||
{ "renewal" => 0, "rsnvac" => 13 }, |
||||
{ "renewal" => 0, "rsnvac" => 18 }, |
||||
{ "renewal" => 0, "rsnvac" => 19 }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Majorrepairs.new(nil, nil, self), |
||||
Form::Lettings::Questions::Mrcdate.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,13 @@
|
||||
class Form::Lettings::Pages::PropertyMajorRepairsValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_major_repairs_value_check" |
||||
@depends_on = [{ "major_repairs_date_in_soft_range?" => true }] |
||||
@title_text = { "translation" => "soft_validations.major_repairs_date.title_text" } |
||||
@informative_text = {} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::MajorRepairsDateValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyNumberOfBedrooms < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_number_of_bedrooms" |
||||
@depends_on = [{ "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Beds.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyNumberOfTimesReletNotSocialLet < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_number_of_times_relet_not_social_let" |
||||
@depends_on = [{ "first_time_property_let_as_social_housing" => 0, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Offered.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyNumberOfTimesReletSocialLet < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_number_of_times_relet_social_let" |
||||
@depends_on = [{ "first_time_property_let_as_social_housing" => 1, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::OfferedSocialLet.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::PropertyPostcode < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_postcode" |
||||
@depends_on = [{ "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::PostcodeKnown.new(nil, nil, self), |
||||
Form::Lettings::Questions::PostcodeFull.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyUnitType < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_unit_type" |
||||
@depends_on = [{ "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::UnittypeGn.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyVacancyReasonFirstLet < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_vacancy_reason_first_let" |
||||
@depends_on = [{ "first_time_property_let_as_social_housing" => 1, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::RsnvacFirstLet.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyVacancyReasonNotFirstLet < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_vacancy_reason_not_first_let" |
||||
@depends_on = [{ "first_time_property_let_as_social_housing" => 0, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Rsnvac.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::PropertyWheelchairAccessible < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "property_wheelchair_accessible" |
||||
@depends_on = [{ "needstype" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Wchair.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::ReasonForLeavingLastSettledHome < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "reason_for_leaving_last_settled_home" |
||||
@depends_on = [{ "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Reason.new(nil, nil, self), |
||||
Form::Lettings::Questions::Reasonother.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ReasonForLeavingLastSettledHomeRenewal < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "reason_for_leaving_last_settled_home_renewal" |
||||
@depends_on = [{ "renewal" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::ReasonRenewal.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::ReasonablePreference < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Reasonpref.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ReasonablePreferenceReason < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "reasonable_preference_reason" |
||||
@depends_on = [{ "reasonpref" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::ReasonablePreferenceReason.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::Referral < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "referral" |
||||
@depends_on = [{ "managing_organisation_provider_type" => "LA", "needstype" => 1, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Referral.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ReferralPrp < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "referral_prp" |
||||
@depends_on = [{ "managing_organisation_provider_type" => "PRP", "needstype" => 1, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::ReferralPrp.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ReferralSupportedHousing < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "referral_supported_housing" |
||||
@depends_on = [{ "managing_organisation_provider_type" => "LA", "needstype" => 2, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::ReferralSupportedHousing.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::ReferralSupportedHousingPrp < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "referral_supported_housing_prp" |
||||
@depends_on = [{ "managing_organisation_provider_type" => "PRP", "needstype" => 2, "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::ReferralSupportedHousingPrp.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,23 @@
|
||||
class Form::Lettings::Pages::Rent4Weekly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "rent_4_weekly" |
||||
@header = "Household rent and charges" |
||||
@depends_on = [ |
||||
{ "household_charge" => 0, "period" => 3, "is_carehome" => 0 }, |
||||
{ "household_charge" => nil, "period" => 3, "is_carehome" => 0 }, |
||||
{ "household_charge" => 0, "period" => 3, "is_carehome" => nil }, |
||||
{ "household_charge" => nil, "period" => 3, "is_carehome" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Brent4Weekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::Scharge4Weekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::Pscharge4Weekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::Supcharg4Weekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::Tcharge4Weekly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,23 @@
|
||||
class Form::Lettings::Pages::RentBiWeekly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "rent_bi_weekly" |
||||
@header = "Household rent and charges" |
||||
@depends_on = [ |
||||
{ "household_charge" => 0, "period" => 2, "is_carehome" => 0 }, |
||||
{ "household_charge" => nil, "period" => 2, "is_carehome" => 0 }, |
||||
{ "household_charge" => 0, "period" => 2, "is_carehome" => nil }, |
||||
{ "household_charge" => nil, "period" => 2, "is_carehome" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::BrentBiWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::SchargeBiWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::PschargeBiWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::SupchargBiWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::TchargeBiWeekly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,23 @@
|
||||
class Form::Lettings::Pages::RentMonthly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "rent_monthly" |
||||
@header = "Household rent and charges" |
||||
@depends_on = [ |
||||
{ "household_charge" => 0, "period" => 4, "is_carehome" => 0 }, |
||||
{ "household_charge" => nil, "period" => 4, "is_carehome" => 0 }, |
||||
{ "household_charge" => 0, "period" => 4, "is_carehome" => nil }, |
||||
{ "household_charge" => nil, "period" => 4, "is_carehome" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::BrentMonthly.new(nil, nil, self), |
||||
Form::Lettings::Questions::SchargeMonthly.new(nil, nil, self), |
||||
Form::Lettings::Questions::PschargeMonthly.new(nil, nil, self), |
||||
Form::Lettings::Questions::SupchargMonthly.new(nil, nil, self), |
||||
Form::Lettings::Questions::TchargeMonthly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::RentOrOtherCharges < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "rent_or_other_charges" |
||||
@depends_on = [{ "needstype" => 2 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::HouseholdCharge.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::RentPeriod < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "rent_period" |
||||
@depends_on = [{ "household_charge" => 0 }, { "household_charge" => nil }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Period.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,43 @@
|
||||
class Form::Lettings::Pages::RentWeekly < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "rent_weekly" |
||||
@header = "Household rent and charges" |
||||
@depends_on = [ |
||||
{ "period" => 1, "household_charge" => 0, "is_carehome" => 0 }, |
||||
{ "period" => 1, "household_charge" => nil, "is_carehome" => 0 }, |
||||
{ "period" => 5, "household_charge" => 0, "is_carehome" => 0 }, |
||||
{ "period" => 5, "household_charge" => nil, "is_carehome" => 0 }, |
||||
{ "period" => 6, "household_charge" => 0, "is_carehome" => 0 }, |
||||
{ "period" => 6, "household_charge" => nil, "is_carehome" => 0 }, |
||||
{ "period" => 7, "household_charge" => 0, "is_carehome" => 0 }, |
||||
{ "period" => 7, "household_charge" => nil, "is_carehome" => 0 }, |
||||
{ "period" => 8, "household_charge" => 0, "is_carehome" => 0 }, |
||||
{ "period" => 8, "household_charge" => nil, "is_carehome" => 0 }, |
||||
{ "period" => 9, "household_charge" => 0, "is_carehome" => 0 }, |
||||
{ "period" => 9, "household_charge" => nil, "is_carehome" => 0 }, |
||||
{ "period" => 1, "household_charge" => 0, "is_carehome" => nil }, |
||||
{ "period" => 1, "household_charge" => nil, "is_carehome" => nil }, |
||||
{ "period" => 5, "household_charge" => 0, "is_carehome" => nil }, |
||||
{ "period" => 5, "household_charge" => nil, "is_carehome" => nil }, |
||||
{ "period" => 6, "household_charge" => 0, "is_carehome" => nil }, |
||||
{ "period" => 6, "household_charge" => nil, "is_carehome" => nil }, |
||||
{ "period" => 7, "household_charge" => 0, "is_carehome" => nil }, |
||||
{ "period" => 7, "household_charge" => nil, "is_carehome" => nil }, |
||||
{ "period" => 8, "household_charge" => 0, "is_carehome" => nil }, |
||||
{ "period" => 8, "household_charge" => nil, "is_carehome" => nil }, |
||||
{ "period" => 9, "household_charge" => 0, "is_carehome" => nil }, |
||||
{ "period" => 9, "household_charge" => nil, "is_carehome" => nil }, |
||||
] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::BrentWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::SchargeWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::PschargeWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::SupchargWeekly.new(nil, nil, self), |
||||
Form::Lettings::Questions::TchargeWeekly.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::Shelteredaccom < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "shelteredaccom" |
||||
@depends_on = [{ "needstype" => 2 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Sheltered.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::StarterTenancy < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Startertenancy.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::StarterTenancyType < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "starter_tenancy_type" |
||||
@depends_on = [{ "startertenancy" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::StarterTenancy.new(nil, nil, self), |
||||
Form::Lettings::Questions::Tenancyother.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::TenancyLength < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "tenancy_length" |
||||
@depends_on = [{ "tenancy" => 4 }, { "tenancy" => 6 }, { "tenancy" => 3 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Tenancylength.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,14 @@
|
||||
class Form::Lettings::Pages::TenancyType < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "tenancy_type" |
||||
@depends_on = [{ "startertenancy" => 2 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::Tenancy.new(nil, nil, self), |
||||
Form::Lettings::Questions::Tenancyother.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class Form::Lettings::Pages::TimeLivedInLocalAuthority < ::Form::Page |
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Layear.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,11 @@
|
||||
class Form::Lettings::Pages::TimeOnWaitingList < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "time_on_waiting_list" |
||||
@depends_on = [{ "renewal" => 0 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::Waityear.new(nil, nil, self)] |
||||
end |
||||
end |
@ -0,0 +1,15 @@
|
||||
class Form::Lettings::Pages::TypeOfAccessNeeds < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "type_of_access_needs" |
||||
@header = "Disabled access needs" |
||||
@depends_on = [{ "housingneeds" => 1 }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::HousingneedsType.new(nil, nil, self), |
||||
Form::Lettings::Questions::HousingneedsOther.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,13 @@
|
||||
class Form::Lettings::Pages::VoidDateValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "void_date_value_check" |
||||
@depends_on = [{ "voiddate_in_soft_range?" => true }] |
||||
@title_text = { "translation" => "soft_validations.void_date.title_text" } |
||||
@informative_text = {} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Lettings::Questions::VoidDateValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue