Skip to content

Commit fd6f8a4

Browse files
committed
Allow a btn labeled on delete modal
1 parent 347a676 commit fd6f8a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/BootstrapAdminUi/templates/shared/components/delete_modal.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{% extends '@SyliusBootstrapAdminUi/shared/components/confirmation_modal.html.twig' %}
22
{% import '@SyliusBootstrapAdminUi/shared/helper/button.html.twig' as button %}
33

4-
{% props id = null, path = null, label = 'sylius.ui.delete', icon = 'tabler:trash-x', disabled = false, form_attr = null, type = 'delete', modal_id = null %}
4+
{% props id = null, path = null, label = 'sylius.ui.delete', icon = 'tabler:trash-x', disabled = false, form_attr = null, type = 'delete', modal_id = null, icon_only = true %}
55

66
{% if modal_id is null %}
77
{% set modal_id = 'delete-modal-' ~ id %}
88
{% endif %}
99

1010
{% block trigger %}
1111
<div data-bs-toggle="tooltip" data-bs-title="{{ label|trans }}">
12-
{{ button.default({icon: icon, icon_class: 'icon text-danger', icon_only: true, disabled: disabled, attr: 'data-bs-toggle=modal data-bs-target=#' ~ modal_id }) }}
12+
{{ button.default({icon: icon, icon_class: 'icon text-danger', icon_only: icon_only, text: label|trans, disabled: disabled, attr: 'data-bs-toggle=modal data-bs-target=#' ~ modal_id }) }}
1313
</div>
1414
{% endblock %}
1515

0 commit comments

Comments
 (0)