From 4628727f8163db2bdb337da68338084b2ad140f4 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 11 Aug 2021 12:31:37 +0200 Subject: [PATCH] Fix DOM ids of ingredient editors We need to have unique DOM ids for ingredient editors Follows https://github.com/AlchemyCMS/alchemy_cms/pull/2167 --- app/views/alchemy/ingredients/_spree_product_editor.html.erb | 1 + app/views/alchemy/ingredients/_spree_taxon_editor.html.erb | 1 + app/views/alchemy/ingredients/_spree_variant_editor.html.erb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/views/alchemy/ingredients/_spree_product_editor.html.erb b/app/views/alchemy/ingredients/_spree_product_editor.html.erb index cfa6356..999603f 100644 --- a/app/views/alchemy/ingredients/_spree_product_editor.html.erb +++ b/app/views/alchemy/ingredients/_spree_product_editor.html.erb @@ -5,6 +5,7 @@ <%= ingredient_label(spree_product_editor, :product_id) %> <%= f.text_field :product_id, value: spree_product_editor.product&.id, + id: spree_product_editor.form_field_id(:product_id), class: 'alchemy_selectbox full_width' %> <% end %> <% end %> diff --git a/app/views/alchemy/ingredients/_spree_taxon_editor.html.erb b/app/views/alchemy/ingredients/_spree_taxon_editor.html.erb index ef90bb8..ad3b7c9 100644 --- a/app/views/alchemy/ingredients/_spree_taxon_editor.html.erb +++ b/app/views/alchemy/ingredients/_spree_taxon_editor.html.erb @@ -5,6 +5,7 @@ <%= ingredient_label(spree_taxon_editor, :taxon_id) %> <%= f.text_field :taxon_id, value: spree_taxon_editor.taxon&.id, + id: spree_taxon_editor.form_field_id(:taxon_id), class: 'alchemy_selectbox full_width' %> <% end %> <% end %> diff --git a/app/views/alchemy/ingredients/_spree_variant_editor.html.erb b/app/views/alchemy/ingredients/_spree_variant_editor.html.erb index 0409138..5a4ebf4 100644 --- a/app/views/alchemy/ingredients/_spree_variant_editor.html.erb +++ b/app/views/alchemy/ingredients/_spree_variant_editor.html.erb @@ -5,6 +5,7 @@ <%= ingredient_label(spree_variant_editor, :variant_id) %> <%= f.text_field :variant_id, value: spree_variant_editor.variant&.id, + id: spree_variant_editor.form_field_id(:variant_id), class: 'alchemy_selectbox full_width' %> <% end %> <% end %>