10 changed files with 115 additions and 63 deletions
			
			
		| @ -1,29 +0,0 @@ | ||||
| <% economic_statuses = [ | ||||
|     OpenStruct.new(id: 0, ethnicity: "Part-time - Less than 30 hours"), | ||||
|     OpenStruct.new(id: 1, ethnicity: "Full-time - 30 hours or more"), | ||||
|     OpenStruct.new(id: 2, ethnicity: "In government training into work, such as New Deal"), | ||||
|     OpenStruct.new(id: 3, ethnicity: "Jobseeker"), | ||||
|     OpenStruct.new(id: 4, ethnicity: "Retired"), | ||||
|     OpenStruct.new(id: 5, ethnicity: "Not seeking work"), | ||||
|     OpenStruct.new(id: 6, ethnicity: "Full-time student"), | ||||
|     OpenStruct.new(id: 7, ethnicity: "Unable to work because of long term sick or disability"), | ||||
|     OpenStruct.new(id: 8, ethnicity: "Child under 16"), | ||||
|     OpenStruct.new(id: 9, ethnicity: "Other"), | ||||
|     OpenStruct.new(id: 10, ethnicity: "Prefer not to say") | ||||
| ] %> | ||||
| 
 | ||||
| <% previous_question = Form.previous_question("economic_status") %> | ||||
| <% content_for :before_content do %> | ||||
|   <%= govuk_back_link href: "/case_logs/#{case_log_id}/#{previous_question}" do %> | ||||
|     Back | ||||
|   <% end %> | ||||
| <% end %> | ||||
| 
 | ||||
| <%= turbo_frame_tag "case_log_form", target: "_top" do %> | ||||
|   <%= form_with action: '/case_logs', method: "next_question", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||||
|     <%= f.govuk_collection_radio_buttons :economic_status, economic_statuses, :id, :ethnicity, legend: { text: "Which of these best describes the tenant's working situation?", size: "l" } %> | ||||
|     <%= f.hidden_field :previous_question, value: :economic_status %> | ||||
|     <%= f.hidden_field :case_log_id, value: case_log_id %> | ||||
|     <%= f.govuk_submit "Save and continue" %> | ||||
|   <% end %> | ||||
| <% end %> | ||||
| @ -0,0 +1,29 @@ | ||||
| <% economic_statuses = [ | ||||
|     OpenStruct.new(id: 0, economic_status: "Part-time - Less than 30 hours"), | ||||
|     OpenStruct.new(id: 1, economic_status: "Full-time - 30 hours or more"), | ||||
|     OpenStruct.new(id: 2, economic_status: "In government training into work, such as New Deal"), | ||||
|     OpenStruct.new(id: 3, economic_status: "Jobseeker"), | ||||
|     OpenStruct.new(id: 4, economic_status: "Retired"), | ||||
|     OpenStruct.new(id: 5, economic_status: "Not seeking work"), | ||||
|     OpenStruct.new(id: 6, economic_status: "Full-time student"), | ||||
|     OpenStruct.new(id: 7, economic_status: "Unable to work because of long term sick or disability"), | ||||
|     OpenStruct.new(id: 8, economic_status: "Child under 16"), | ||||
|     OpenStruct.new(id: 9, economic_status: "Other"), | ||||
|     OpenStruct.new(id: 10, economic_status: "Prefer not to say") | ||||
| ] %> | ||||
| 
 | ||||
| <% previous_question = Form.previous_question("tenant_economic_status") %> | ||||
| <% content_for :before_content do %> | ||||
|   <%= govuk_back_link href: "/case_logs/#{case_log_id}/#{previous_question}" do %> | ||||
|     Back | ||||
|   <% end %> | ||||
| <% end %> | ||||
| 
 | ||||
| <%= turbo_frame_tag "case_log_form", target: "_top" do %> | ||||
|   <%= form_with action: '/case_logs', method: "next_question", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||||
|     <%= f.govuk_collection_radio_buttons :tenant_economic_status, economic_statuses, :id, legend: { text: "Which of these best describes the tenant's working situation?", size: "l" } %> | ||||
|     <%= f.hidden_field :previous_question, value: :tenant_economic_status %> | ||||
|     <%= f.hidden_field :case_log_id, value: case_log_id %> | ||||
|     <%= f.govuk_submit "Save and continue" %> | ||||
|   <% end %> | ||||
| <% end %> | ||||
| @ -0,0 +1,6 @@ | ||||
| class RenameTenantFields < ActiveRecord::Migration[6.1] | ||||
|   def change | ||||
|     rename_column :case_logs, :economic_status, :tenant_economic_status | ||||
|     rename_column :case_logs, :number_of_other_members, :household_number_of_other_members | ||||
|   end | ||||
| end | ||||
					Loading…
					
					
				
		Reference in new issue