forked from openfoodfoundation/openfoodnetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openfoodfoundation#11068: add product_v3 delete_modals partial
- Loading branch information
1 parent
0efd78b
commit c202324
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |