From 02db30202bb002985278e337aa123f5599fb23e9 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 5 Mar 2025 11:04:53 +1100 Subject: [PATCH] Use rails form helper methods This helps ensure the labels are attached to the radio buttons, so you can click on the words to select the option. --- .../admin/enterprises/form/_shop_preferences.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/enterprises/form/_shop_preferences.html.haml b/app/views/admin/enterprises/form/_shop_preferences.html.haml index 5b75001514..7a650382cb 100644 --- a/app/views/admin/enterprises/form/_shop_preferences.html.haml +++ b/app/views/admin/enterprises/form/_shop_preferences.html.haml @@ -106,8 +106,8 @@ %div{'ofn-with-tip' => t('.customer_names_tip')} %a= t 'admin.whats_this' .three.columns - = radio_button :enterprise, :show_customer_names_to_suppliers, true - = label :enterprise_show_customer_names_to_suppliers, t('.customer_names_true'), value: :true + = f.radio_button :show_customer_names_to_suppliers, true + = f.label :show_customer_names_to_suppliers, t('.customer_names_true'), value: :true .five.columns.omega - = radio_button :enterprise, :show_customer_names_to_suppliers, false - = label :enterprise_show_customer_names_to_suppliers, t('.customer_names_false'), value: :false + = f.radio_button :show_customer_names_to_suppliers, false + = f.label :show_customer_names_to_suppliers, t('.customer_names_false'), value: :false