From a6a5fdfb3b3cf7f2f99c4e93b259ef367c3d9e67 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 8 Apr 2015 13:25:47 +1000 Subject: [PATCH] Require that the user selects whether their enterprise charges sales tax --- .../javascripts/templates/registration/about.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/templates/registration/about.html.haml b/app/assets/javascripts/templates/registration/about.html.haml index 4343daaab7..be9948b95d 100644 --- a/app/assets/javascripts/templates/registration/about.html.haml +++ b/app/assets/javascripts/templates/registration/about.html.haml @@ -44,10 +44,12 @@ .small-12.columns .field %label{ for: 'enterprise_charges_sales_tax' }= t(:charges_sales_tax) - %input{ id: 'enterprise_charges_sales_tax_true', type: 'radio', value: 'true', ng: { model: 'enterprise.charges_sales_tax' } } + %input{ id: 'enterprise_charges_sales_tax_true', type: 'radio', name: 'charges_sales_tax', value: 'true', required: true, ng: { model: 'enterprise.charges_sales_tax' } } %label{ for: 'enterprise_charges_sales_tax_true' } Yes - %input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', value: 'false', ng: { model: 'enterprise.charges_sales_tax' } } + %input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', name: 'charges_sales_tax', value: 'false', required: true, ng: { model: 'enterprise.charges_sales_tax' } } %label{ for: 'enterprise_charges_sales_tax_false' } No + %span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } } + You need to make a selection. .row.buttons.pad-top .small-12.columns