|
|
|
|
@ -8,12 +8,11 @@ class Form::Lettings::Subsections::Setup < ::Form::Subsection
|
|
|
|
|
|
|
|
|
|
def pages |
|
|
|
|
@pages ||= [ |
|
|
|
|
organisation_page, |
|
|
|
|
stock_owner_page, |
|
|
|
|
Form::Lettings::Pages::StockOwner.new(nil, nil, self), |
|
|
|
|
Form::Lettings::Pages::MinRentValueCheck.new("stock_owner_min_rent_value_check", nil, self), |
|
|
|
|
Form::Lettings::Pages::MaxRentValueCheck.new("stock_owner_max_rent_value_check", nil, self), |
|
|
|
|
managing_organisation_page, |
|
|
|
|
created_by_page, |
|
|
|
|
Form::Lettings::Pages::ManagingOrganisation.new(nil, nil, self), |
|
|
|
|
Form::Lettings::Pages::CreatedBy.new(nil, nil, self), |
|
|
|
|
Form::Lettings::Pages::NeedsType.new(nil, nil, self), |
|
|
|
|
Form::Lettings::Pages::Scheme.new(nil, nil, self), |
|
|
|
|
Form::Lettings::Pages::Location.new(nil, nil, self), |
|
|
|
|
@ -34,32 +33,4 @@ class Form::Lettings::Subsections::Setup < ::Form::Subsection
|
|
|
|
|
def enabled?(_lettings_log) |
|
|
|
|
true |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
|
|
def organisation_page |
|
|
|
|
return if FeatureToggle.managing_for_other_user_enabled? |
|
|
|
|
|
|
|
|
|
Form::Common::Pages::Organisation.new(nil, nil, self) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def stock_owner_page |
|
|
|
|
return unless FeatureToggle.managing_for_other_user_enabled? |
|
|
|
|
|
|
|
|
|
Form::Lettings::Pages::StockOwner.new(nil, nil, self) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def managing_organisation_page |
|
|
|
|
return unless FeatureToggle.managing_for_other_user_enabled? |
|
|
|
|
|
|
|
|
|
Form::Lettings::Pages::ManagingOrganisation.new(nil, nil, self) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def created_by_page |
|
|
|
|
if FeatureToggle.managing_for_other_user_enabled? |
|
|
|
|
Form::Lettings::Pages::CreatedBy.new(nil, nil, self) |
|
|
|
|
else |
|
|
|
|
Form::Common::Pages::CreatedBy.new(nil, nil, self) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|