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-922] Fixes issue with not being able to disable currency settings once they are enabled

Robert Nowakowski8289b393df9f
diff --git a/backend/app/views/spree/admin/general_settings/_form.html.erb b/backend/app/views/spree/admin/general_settings/_form.html.erb
index d2b4342706..2d02e06f33 100644
--- a/backend/app/views/spree/admin/general_settings/_form.html.erb
+++ b/backend/app/views/spree/admin/general_settings/_form.html.erb
@@ -7,7 +7,7 @@
<div class="form-group">
<div class="checkbox">
<label>
- <%= check_box_tag(:allow_currency_change, 1, Spree::Config.allow_currency_change) %>
+ <%= check_box('', :allow_currency_change, { checked: Spree::Config.allow_currency_change }) %>
<%= Spree.t('allow_currency_change.short') %>
</label>
<p class="help-block"><%= Spree.t('allow_currency_change.long') %></p>
@@ -17,7 +17,7 @@
<div class="form-group">
<div class="checkbox">
<label>
- <%= check_box_tag(:show_currency_selector, 1, Spree::Config.show_currency_selector) %>
+ <%= check_box('', :show_currency_selector, { checked: Spree::Config.show_currency_selector}) %>
<%= Spree.t('show_currency_selector.short') %>
</label>
<p class="help-block"><%= Spree.t('show_currency_selector.long_html') %></p>