Add user confirmation dialog on delete file button

This commit is contained in:
Alice Gaudon 2021-04-22 19:48:55 +02:00
parent 51da9f4c7c
commit 53c5763909
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@
<form action="{{ route('delete-file-frontend', file.slug) }}" method="post">
{{ macros.csrf(getCsrfToken) }}
<button class="button danger"><i data-feather="trash"></i> <span class="tip">Delete</span></button>
<button class="button danger" onclick="return confirm('Are you sure you want to delete file {{ file.real_name }}?');"><i data-feather="trash"></i> <span class="tip">Delete</span></button>
</form>
{% endif %}
</td>