mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-09 03:20:21 +00:00
11068: add divs to contain modals
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user