Skip to content

Commit

Permalink
openfoodfoundation#11068: add product_v3 delete_modals partial
Browse files Browse the repository at this point in the history
  • Loading branch information
chahmedejaz committed Dec 20, 2023
1 parent 0efd78b commit c202324
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/views/admin/products_v3/_delete_modals.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- object_ids.each do |object_id|
- delete_modal = ConfirmModalComponent.new(id: "delete_#{object_type}_#{object_id}",
confirm_button_text: t(".delete_#{object_type}_modal.confirmation_text"),
cancel_button_text: t(".delete_#{object_type}_modal.cancellation_text"),
confirm_button_color: :red,
controller: "product-actions",
confirm_actions: "click->product-actions#delete#{object_type.titleize}",
confirm_reflexes: nil,
controller_data_values: {"current-id": object_id},
)
= render delete_modal do
.margin-bottom-30
= t(".delete_#{object_type}_modal.prompt_html")
.margin-bottom-30

0 comments on commit c202324

Please sign in to comment.