diff --git a/app/models/form/sales/pages/buyer_company.rb b/app/models/form/sales/pages/buyer_company.rb new file mode 100644 index 000000000..6985a3908 --- /dev/null +++ b/app/models/form/sales/pages/buyer_company.rb @@ -0,0 +1,15 @@ +class Form::Sales::Pages::BuyerCompany < ::Form::Page + def initialize(id, hsh, subsection) + super + @id = "buyer_company" + @header = "" + @description = "" + @subsection = subsection + end + + def questions + @questions ||= [ + Form::Sales::Questions::BuyerCompany.new(nil, nil, self), + ] + end +end diff --git a/app/models/form/sales/questions/buyer_company.rb b/app/models/form/sales/questions/buyer_company.rb new file mode 100644 index 000000000..70c732866 --- /dev/null +++ b/app/models/form/sales/questions/buyer_company.rb @@ -0,0 +1,17 @@ +class Form::Sales::Questions::BuyerCompany < ::Form::Question + def initialize(id, hsh, page) + super + @id = "companybuy" + @check_answer_label = "Company buyer" + @header = "Is the buyer a company?" + @hint_text = "" + @type = "radio" + @answer_options = ANSWER_OPTIONS + @page = page + end + + ANSWER_OPTIONS = { + "1" => { "value" => "Yes" }, + "2" => { "value" => "No" }, + }.freeze +end diff --git a/app/models/form/sales/subsections/setup.rb b/app/models/form/sales/subsections/setup.rb index 7601bbb51..b9ba89dcf 100644 --- a/app/models/form/sales/subsections/setup.rb +++ b/app/models/form/sales/subsections/setup.rb @@ -16,6 +16,7 @@ class Form::Sales::Subsections::Setup < ::Form::Subsection Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self), Form::Sales::Pages::DiscountedOwnershipType.new(nil, nil, self), Form::Sales::Pages::OutrightOwnershipType.new(nil, nil, self), + Form::Sales::Pages::BuyerCompany.new(nil, nil, self), Form::Sales::Pages::BuyerLive.new(nil, nil, self), Form::Sales::Pages::JointPurchase.new(nil, nil, self), Form::Sales::Pages::NumberJointBuyers.new(nil, nil, self),