11068: add divs to contain modals

This commit is contained in:
Ahmed Ejaz
2023-12-16 21:57:48 +05:00
parent 9c321ef9c8
commit d767529e11

View File

@@ -1,15 +1,17 @@
- base_translation_key = ".delete_#{object_type}_modal"
- object_ids.each do |object_id|
- delete_modal = ConfirmModalComponent.new(id: "delete_#{object_type}_#{object_id}",
confirm_button_text: t("#{base_translation_key}.confirmation_text"),
cancel_button_text: t("#{base_translation_key}.cancellation_text"),
confirm_reflexes: "click->products#delete_#{object_type}",
confirm_button_class: :red,
confirm_reflex_data: {"current-id": object_id},
)
= render delete_modal do
%h2.margin-bottom-20{style:'color: black'}
= t("#{base_translation_key}.heading")
%p
= t("#{base_translation_key}.prompt")
.margin-bottom-30
-# object_type can be 'variant' or 'product'
%div{ id: "#{object_type}-delete-action-modals" }
- base_translation_key = ".delete_#{object_type}_modal"
- object_ids.each do |object_id|
- delete_modal = ConfirmModalComponent.new(id: "delete_#{object_type}_#{object_id}",
confirm_button_text: t("#{base_translation_key}.confirmation_text"),
cancel_button_text: t("#{base_translation_key}.cancellation_text"),
confirm_reflexes: "click->products#delete_#{object_type}",
confirm_button_class: :red,
confirm_reflex_data: {"current-id": object_id},
)
= render delete_modal do
%h2.margin-bottom-20{style:'color: black'}
= t("#{base_translation_key}.heading")
%p
= t("#{base_translation_key}.prompt")
.margin-bottom-30