3 changed files with 33 additions and 0 deletions
			
			
		@ -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 | 
				
			||||||
@ -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 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue