<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-sm offset-sm-3 pl-2">
            {% set delete_disabled = (not is_granted("delete", entity)) or (entity.group is defined and entity.id == 1) %}
            <button class="btn btn-danger" {% if delete_disabled %}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>
