mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Show error messages and highlight for bulk editing
The validation message is on "tax_category", so labels and error messages can use that to show the error state. But the select field has to be "tax_category_id" to work.
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
include_blank: t('.none_tax_category'),
|
||||
aria_label: t('.tax_category_field_name'),
|
||||
placeholder_value: t('.search_for_tax_categories')))
|
||||
= error_message_on variant, :tax_category
|
||||
%td.align-left
|
||||
-# empty
|
||||
%td.align-right
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
= f.number_field field, value: value, class: 'fullwidth', step: 0.01
|
||||
|
||||
.field
|
||||
= f.label :tax_category_id, t(:tax_category)
|
||||
= f.label :tax_category, t(:tax_category), for: :tax_category_id
|
||||
= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: t(:none) }, { class: 'select2 fullwidth' })
|
||||
|
||||
.field
|
||||
|
||||
Reference in New Issue
Block a user