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.
This commit is contained in:
David Cook
2025-03-05 11:04:53 +11:00
parent b9901b91fe
commit 02db30202b

View File

@@ -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