Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

[SD-1071] Changes cost currency field to dropdown on product edit page

Robert Nowakowski0b8d3d413ea9
diff --git a/backend/app/views/spree/admin/products/_form.html.erb b/backend/app/views/spree/admin/products/_form.html.erb
index 3d8fa7eb48..df7e183e3a 100644
--- a/backend/app/views/spree/admin/products/_form.html.erb
+++ b/backend/app/views/spree/admin/products/_form.html.erb
@@ -56,7 +56,7 @@
<div data-hook="admin_product_form_cost_currency" class="omega two columns">
<%= f.field_container :cost_currency, class: ['form-group'] do %>
<%= f.label :cost_currency, Spree.t(:cost_currency) %>
- <%= f.text_field :cost_currency, class: 'form-control' %>
+ <%= f.select :cost_currency, currency_options(@product.cost_currency), {}, { class: 'select2' } %>
<%= f.error_message_on :cost_currency %>
<% end %>
</div>