mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-04 02:05:16 +02:00
Allow to delete parts.
This commit is contained in:
parent
0ff9e3813a
commit
94ed78f66d
4 changed files with 55 additions and 8 deletions
|
@ -23,6 +23,17 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
<form method="post" class="mt-2" action="{{ part|entityURL('delete') }}"
|
||||
data-delete-form data-title="{% trans with {'%name%': part.name }%}part.delete.confirm_title{% endtrans %}"
|
||||
data-message="{% trans %}part.delete.message{% endtrans %}">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ part.id) }}">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-danger" {% if not is_granted("delete", part) %}disabled{% endif %}">
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
{% trans %}part.delete{% endtrans %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue