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.

Added missing admin save target for store/profile form so CMD/CTRL+S keybinding works

Damian Legawiec821f827710d4
diff --git a/admin/app/views/spree/admin/profile/edit.html.erb b/admin/app/views/spree/admin/profile/edit.html.erb
index a2e613838d..7ad4213b67 100644
--- a/admin/app/views/spree/admin/profile/edit.html.erb
+++ b/admin/app/views/spree/admin/profile/edit.html.erb
@@ -3,7 +3,7 @@
<% end %>
<%= content_for :page_actions do %>
- <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user' %>
+ <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user', data: { admin_target: 'save' } %>
<% end %>
<%= form_for @user, url: spree.admin_profile_path, method: :put, as: :user do |f| %>
diff --git a/admin/app/views/spree/admin/stores/edit.html.erb b/admin/app/views/spree/admin/stores/edit.html.erb
index 75a04e6d9a..f38c44d374 100644
--- a/admin/app/views/spree/admin/stores/edit.html.erb
+++ b/admin/app/views/spree/admin/stores/edit.html.erb
@@ -1,5 +1,5 @@
<%= content_for :page_actions do %>
- <%= turbo_save_button_tag Spree.t('actions.update'), class: 'btn btn-primary', form: "edit_store_#{current_store.id}" %>
+ <%= turbo_save_button_tag Spree.t('actions.update'), class: 'btn btn-primary', form: "edit_store_#{current_store.id}", data: { admin_target: 'save' } %>
<% end %>
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @store }, class: 'mb-5 pb-5' %>