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.

Update button

Matthew Kennedyf1c59dd8c543
diff --git a/backend/app/views/spree/admin/stores/index.html.erb b/backend/app/views/spree/admin/stores/index.html.erb
index e4ddc7b579..d66abc45d9 100644
--- a/backend/app/views/spree/admin/stores/index.html.erb
+++ b/backend/app/views/spree/admin/stores/index.html.erb
@@ -28,9 +28,9 @@
<% if can?(:edit, store) %>
<% btn_url = store.default? ? '#' : spree.set_default_admin_store_path(store) %>
- <% btn_class = store.default? ? 'inactive' : 'warning' %>
+ <% btn_class = store.default? ? 'outline-secondary disabled' : 'warning' %>
<% btn_label = store.default? ? nil : Spree.t(:store_set_default_button) %>
- <%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip") %>
+ <%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip", aria: {disabled: store.default?}) %>
<% end %>
<%= link_to_delete store, no_text: true, url: spree.admin_store_path(store) if can?(:destroy, store) %>