From d767529e117a4865ae903533f47113cccb582ec4 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Sat, 16 Dec 2023 21:57:48 +0500 Subject: [PATCH] 11068: add divs to contain modals --- .../products_v3/_delete_modals.html.haml | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/app/views/admin/products_v3/_delete_modals.html.haml b/app/views/admin/products_v3/_delete_modals.html.haml index ff4c89e3f1..07938e5cde 100644 --- a/app/views/admin/products_v3/_delete_modals.html.haml +++ b/app/views/admin/products_v3/_delete_modals.html.haml @@ -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