0
0
mirror of https://github.com/kevinpapst/kimai2.git synced 2024-12-22 12:18:29 +00:00
kevinpapst_kimai2/templates/default/_form_delete_modal.html.twig
2024-02-02 13:52:24 +01:00

29 lines
1.2 KiB
Twig

{% embed '@theme/embeds/modal.html.twig' %}
{% set used = used|default(false) %}
{% block modal_id %}form_modal{% endblock %}
{% block modal_before %}{{ form_start(form) }}{% endblock %}
{% block modal_effects %}{% endblock %}
{% block modal_title %}
{{ title|default('confirm.delete'|trans) }}
{% endblock %}
{% block modal_body %}
{% if delete_item_name is defined %}
<p><strong>{{ delete_item_name }}</strong></p>
{% endif %}
{% if used is same as (false) %}
{{ 'delete.not_in_use'|trans }}
<div class="d-none">
{{ form_widget(form) }}
</div>
{% else %}
<p>{{ message }}</p>
{{ form_widget(form) }}
{% endif %}
{% endblock %}
{% block modal_footer %}
<button type="submit" class="btn {% if used %}btn-danger{% else %}btn-primary{% endif %} pull-left modal-form-save" data-loading-text="{{ 'delete'|trans }}..." id="{{ block('modal_id') }}_save">{{ 'delete'|trans }}</button>
<button type="button" class="btn btn-cancel" data-bs-dismiss="modal">{{ 'action.close'|trans }}</button>
{% endblock %}
{% block modal_end %}{{ form_end(form) }}{% endblock %}
{% endembed %}