mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remplace collection_select by select and fill the selected item
+ add tom-select controller
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
= f.field_container :supplier do
|
||||
= f.label :supplier_id, t(".supplier")
|
||||
%span.required *
|
||||
= f.collection_select(:supplier_id, @producers, :id, :name, {:include_blank => true, :selected => select_only_item(@producers)}, {:class => "select2 fullwidth"})
|
||||
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), {}, { "data-controller": "tom-select", class: "primary" }
|
||||
= f.error_message_on :supplier
|
||||
.eight.columns.omega
|
||||
= f.field_container :name do
|
||||
|
||||
Reference in New Issue
Block a user