2019-04-06 18:38:36 +02:00
|
|
|
<form method="post" class="" action="{{ entity|entityURL('delete') }}"
|
|
|
|
data-delete-form data-title="{% trans with {'%name%': entity.name }%}entity.delete.confirm_title{% endtrans %}"
|
2019-04-07 19:51:07 +02:00
|
|
|
data-message="{% trans %}entity.delete.message{% endtrans %}">
|
2019-04-06 18:38:36 +02:00
|
|
|
<input type="hidden" name="_method" value="DELETE">
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ entity.id) }}">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class=""></div>
|
2022-07-24 18:08:21 +02:00
|
|
|
<div class="col-sm offset-sm-3 ps-2">
|
2019-09-19 13:49:10 +02:00
|
|
|
{% set delete_disabled = (not is_granted("delete", entity)) or (entity.group is defined and entity.id == 1) %}
|
2020-02-23 00:44:52 +01:00
|
|
|
<div class="btn-group">
|
|
|
|
<button class="btn btn-danger" {% if delete_disabled %}disabled{% endif %}>{% trans %}entity.delete{% endtrans %}</button>
|
2022-07-24 18:08:21 +02:00
|
|
|
<button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2020-02-23 00:44:52 +01:00
|
|
|
<span class="sr-only">Toggle Dropdown</span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu p-2">
|
|
|
|
<div class="form-group"><label for="delete_log_comment">{% trans %}edit.log_comment{% endtrans %}</label>
|
|
|
|
<input type="text" id="delete_log_comment" name="log_comment" class="form-control">
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-04-20 19:37:24 +02:00
|
|
|
</div>
|
2020-02-23 00:44:52 +01:00
|
|
|
{% if entity.parent is defined %}
|
2022-07-24 18:08:21 +02:00
|
|
|
<div class="ms-2 custom-control custom-checkbox custom-control-inline">
|
2022-07-24 18:44:05 +02:00
|
|
|
<input type="checkbox" class="form-check-input" id="recursive" name="delete_recursive">
|
|
|
|
<label class="form-check-label" for="recursive">{% trans %}entity.delete.recursive{% endtrans %}</label>
|
2020-02-23 00:44:52 +01:00
|
|
|
</div>
|
2019-04-28 14:18:11 +02:00
|
|
|
{% endif %}
|
2019-04-06 18:38:36 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|