mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Add Archive and Delete buttons to document details along with button titles to state what the button does, also added a from var to fix redirect behavior if deleting from document details go back to documents listing
This commit is contained in:
@@ -633,7 +633,15 @@ if (isset($_GET['delete_document'])) {
|
||||
|
||||
flash_alert("Document <strong>$document_name</strong> deleted and all versions", 'error');
|
||||
|
||||
redirect();
|
||||
// Determine redirect behavior
|
||||
// If there's a "from" parameter, we can use it to decide where to go
|
||||
if (isset($_GET['from']) && $_GET['from'] === 'document_details') {
|
||||
// User deleted from document_details.php
|
||||
redirect("documents.php?client_id=$client_id");
|
||||
} else {
|
||||
// Default behavior — redirect back to previous page
|
||||
redirect();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user