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.

Add `portal: false` to dropdowns inside turbo frames or referencing D… (#13335)

Damian Legawiec641eae17f6c0
diff --git a/admin/app/views/spree/admin/orders/_line_item.html.erb b/admin/app/views/spree/admin/orders/_line_item.html.erb
index 5c01c90f92..492aacc284 100644
--- a/admin/app/views/spree/admin/orders/_line_item.html.erb
+++ b/admin/app/views/spree/admin/orders/_line_item.html.erb
@@ -23,7 +23,7 @@
</div>
<div class="w-5">
<% if can?(:edit, line_item) %>
- <%= dropdown do %>
+ <%= dropdown portal: false do %>
<%= dropdown_toggle class: 'btn-light btn-sm' do %>
<%= icon "dots-vertical", class: "mr-0" %>
<% end %>
diff --git a/admin/app/views/spree/admin/page_builder/_add_block.html.erb b/admin/app/views/spree/admin/page_builder/_add_block.html.erb
index 32b704a917..3ca5895790 100644
--- a/admin/app/views/spree/admin/page_builder/_add_block.html.erb
+++ b/admin/app/views/spree/admin/page_builder/_add_block.html.erb
@@ -1,10 +1,10 @@
<%= form_for section.blocks.new, url: spree.admin_page_section_blocks_path(section), html: { class: 'list-group-item sidebar-page-block px-0 py-1 border-0 rounded'}, data: { controller: 'block-form', block_form_target: :form } do |f| %>
<%= f.hidden_field :type, data: { block_form_target: 'type' } %>
- <%= dropdown do %>
+ <%= dropdown portal: false do %>
<%= dropdown_toggle class: 'btn-sm btn-secondary d-flex-inline' do %>
<%= icon("circle-plus") %>
- Add block
+ <%= Spree.t(:add_page_block) %>
<% end %>
<%= dropdown_menu do %>
<% section.available_blocks_to_add.each do |block_class| %>
diff --git a/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb b/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb
index 3aef682fd8..b7e26eadc8 100644
--- a/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb
+++ b/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb
@@ -4,7 +4,7 @@
<h5 class="card-title"><%= promotion_action.human_name %></h5>
<% if can?(:update, promotion_action) || can?(:destroy, promotion_action) %>
- <%= dropdown do %>
+ <%= dropdown portal: false do %>
<%= dropdown_toggle class: 'btn-light btn-sm px-1' do %>
<%= icon('dots-vertical', class: 'mr-0') %>
<% end %>
diff --git a/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb b/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb
index 24c862ed7a..f5b279c16f 100644
--- a/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb
+++ b/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb
@@ -4,7 +4,7 @@
<h5 class="card-title"><%= promotion_rule.human_name %></h5>
<% if can?(:update, promotion_rule) || can?(:destroy, promotion_rule) %>
- <%= dropdown do %>
+ <%= dropdown portal: false do %>
<%= dropdown_toggle class: 'btn-light btn-sm px-1' do %>
<%= icon('dots-vertical', class: 'mr-0') %>
<% end %>
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index b1171e02cb..afa815ccc9 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -624,6 +624,7 @@ en:
add_new_style: Add New Style
add_one: Add One
add_option_value: Add Option Value
+ add_page_block: Add Block
add_product: Add Product
add_product_properties: Add Product Properties
add_products: Add Products