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.

Improve General Settings UX

Damian Legawiece1e3183d8ef1
diff --git a/backend/app/views/spree/admin/general_settings/_form.html.erb b/backend/app/views/spree/admin/general_settings/_form.html.erb
deleted file mode 100644
index 4033838fb1..0000000000
--- a/backend/app/views/spree/admin/general_settings/_form.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-<div class="panel panel-default currencies">
- <div class="panel-heading">
- <%= Spree.t(:currencies) %>
- </div>
-
- <div class="panel-body">
- <div class="form-group">
- <div class="checkbox">
- <label>
- <%= check_box('', :show_store_currency_selector, { checked: Spree::Config.show_store_currency_selector }) %>
- <%= Spree.t('show_store_currency_selector.short') %>
- </label>
- <p class="help-block"><%= Spree.t('show_store_currency_selector.long') %></p>
- </div>
- </div>
- </div>
-</div>
diff --git a/backend/app/views/spree/admin/general_settings/edit.html.erb b/backend/app/views/spree/admin/general_settings/edit.html.erb
index 9a7126a415..918a76c73f 100644
--- a/backend/app/views/spree/admin/general_settings/edit.html.erb
+++ b/backend/app/views/spree/admin/general_settings/edit.html.erb
@@ -66,11 +66,34 @@
</div>
<div class="card-body">
+ <div class="alert alert-warning col-12">
+ This can be overriden by individual Store settings
+ </div>
<div class="form-group">
- <%= label_tag :currency, Spree.t(:choose_currency) %>
+ <%= label_tag :currency, Spree.t(:default_currency) %>
<%= select_tag :currency, currency_options %>
</div>
- <%= render partial: 'form' %>
+ </div>
+ </div>
+
+ <div class="card mb-3" id="general-settings-stores" data-hook="general_settings_stores">
+ <div class="card-header">
+ <h1 class="card-title mb-0 h5">
+ <%= Spree.t(:multiple_stores)%>
+ </h1>
+ </div>
+ <div class="card-body">
+ <div class="alert alert-warning col-12">
+ <%= Spree.t('show_store_currency_selector.long') %>
+ </div>
+ <div class="form-group">
+ <div class="checkbox">
+ <label>
+ <%= check_box('', :show_store_currency_selector, { checked: Spree::Config.show_store_currency_selector }) %>
+ <%= Spree.t('show_store_currency_selector.short') %>
+ </label>
+ </div>
+ </div>
</div>
</div>
</div>