Skip to content

Commit

Permalink
Bacth action: add confirm modal 2le/crudit#451
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-helies authored Oct 21, 2024
1 parent cc7a947 commit 40052f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Resources/views/brick/list_items/_batch.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
class="{{ action.cssClass ?? 'btn btn-sm crudit-batch-dropdown-item dropdown-item' }}"
{% if action.modal %}
data-bs-toggle="modal" data-bs-target="#modal_{{ action.id }}"
{% elseif action.confirmModal %}
data-bs-toggle="modal"
data-bs-target="#modal-confirm"
data-confirm-link="{{ path(action.path.route, params) }}"
data-confirm-text="{{ ('modal.confirm.' ~ action.label)|trans }}"
{% elseif form %}
data-form="batch-form-{{ key ~ '-' ~ view.id }}"
{% else %}
Expand Down

0 comments on commit 40052f6

Please sign in to comment.