Client file deletion

- Add file delete confirmation modal
- Change file deletes to POST not GET requests in post.php as they are state changing
- Require CSRF validation for file deletes
This commit is contained in:
Marcus Hill
2023-04-08 21:59:54 +01:00
parent c2b25cbf7d
commit 04dad13ad3
5 changed files with 46 additions and 17 deletions

5
js/file_delete_modal.js Normal file
View File

@@ -0,0 +1,5 @@
function populateFileDeleteModal(file_id, file_name) {
// Dynamically populate the file delete modal with the file id (hidden) and name
document.getElementById("file_delete_id").value = file_id;
document.getElementById("file_delete_name").innerText = file_name;
}