mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
11060 - use SearchableDropdownComponent for categories or tax categories
This commit is contained in:
committed by
Rachel Arnould
parent
f6efd47af2
commit
aad48b4670
@@ -43,11 +43,18 @@
|
||||
%td.align-left
|
||||
-# empty producer name
|
||||
%td.field.naked_inputs
|
||||
= f.select :primary_taxon_id, options_for_select(category_options, variant.primary_taxon_id), {},
|
||||
data: { "controller": "tom-select", 'tom-select-placeholder-value': t('admin.products_v3.filters.search_for_categories')}
|
||||
= render(SearchableDropdownComponent.new(form: f,
|
||||
name: :primary_taxon_id,
|
||||
options: category_options,
|
||||
selected_option: variant.primary_taxon_id,
|
||||
placeholder_value: t('admin.products_v3.filters.search_for_categories')))
|
||||
%td.field.naked_inputs
|
||||
= f.select :tax_category_id, options_for_select(tax_category_options, variant.tax_category_id), {include_blank: t('.none_tax_category')},
|
||||
data: { "controller": "tom-select", 'tom-select-placeholder-value': t('.search_for_tax_categories')}
|
||||
= render(SearchableDropdownComponent.new(form: f,
|
||||
name: :tax_category_id,
|
||||
options: tax_category_options,
|
||||
selected_option: variant.tax_category_id,
|
||||
include_blank: t('.none_tax_category'),
|
||||
placeholder_value: t('.search_for_tax_categories')))
|
||||
%td.align-left
|
||||
-# empty
|
||||
%td.align-right
|
||||
|
||||
Reference in New Issue
Block a user