Module: Spree::Admin::ModalHelper
- Defined in:
- app/helpers/spree/admin/modal_helper.rb
Instance Method Summary collapse
-
#modal_close_button ⇒ String
render a close button for the modal.
-
#modal_discard_button ⇒ String
render a discard button for the modal.
-
#modal_header(title) ⇒ String
render a header for the modal.
Instance Method Details
#modal_close_button ⇒ String
render a close button for the modal
18 19 20 |
# File 'app/helpers/spree/admin/modal_helper.rb', line 18 def ('', type: 'button', class: 'btn-close', data: { dismiss: 'modal', aria_label: Spree.t(:close) }).html_safe end |
#modal_discard_button ⇒ String
render a discard button for the modal
24 25 26 27 28 |
# File 'app/helpers/spree/admin/modal_helper.rb', line 24 def (type: 'button', class: 'btn btn-light mr-auto', data: { dismiss: 'modal' }) do Spree.t('actions.discard') end.html_safe end |
#modal_header(title) ⇒ String
render a header for the modal
7 8 9 10 11 12 13 14 |
# File 'app/helpers/spree/admin/modal_helper.rb', line 7 def modal_header(title) Spree::Deprecation.warn('Bootstrap modals are deprecated and will be removed in Spree 5.5. 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') + end.html_safe end |