mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-29 21:14:29 +02:00
18 lines
1.1 KiB
Twig
18 lines
1.1 KiB
Twig
<form method="post" class="" action="{{ entity|entityURL('delete') }}"
|
|
data-delete-form data-title="{% trans with {'%name%': entity.name }%}entity.delete.confirm_title{% endtrans %}"
|
|
data-message="{% trans %}entity.delete.message{% endtrans %}">
|
|
<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>
|
|
<div class="col offset-3 pl-2">
|
|
<button class="btn btn-danger" {% if not is_granted("delete", entity) %}disabled{% endif %}">{% trans %}entity.delete{% endtrans %}</button>
|
|
{% if entity.parent is defined %}
|
|
<div class="ml-2 custom-control custom-checkbox custom-control-inline">
|
|
<input type="checkbox" class="custom-control-input" id="recursive" name="delete_recursive">
|
|
<label class="custom-control-label" for="recursive">{% trans %}entity.delete.recursive{% endtrans %}</label>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</form>
|