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.

Deprecate bootstrap modal helpers

Damian Legawiec344b976e51ae
diff --git a/admin/app/helpers/spree/admin/modal_helper.rb b/admin/app/helpers/spree/admin/modal_helper.rb
index c46bbbabc7..97f138971b 100644
--- a/admin/app/helpers/spree/admin/modal_helper.rb
+++ b/admin/app/helpers/spree/admin/modal_helper.rb
@@ -5,6 +5,8 @@ module Spree
# @param title [String, Proc] the title of the modal
# @return [String]
def modal_header(title)
+ Spree::Deprecation.warn('Bootstrap modals are deprecated and will be removed in Spree 6. Please use native dialogs with `dialog_header` helper.')
+
title = capture(&title) if block_given?
content_tag(:div, class: 'modal-header') do
content_tag(:h5, title, class: 'modal-title') + modal_close_button