When deleting quote from the client or global list view redirect quote delete back to the correct corresponsing list view also make Delete Quote Functional on quote details

This commit is contained in:
johnnyq 2023-05-08 12:37:05 -04:00
parent 53e0ebdbf6
commit 5ee78ef1f3
3 changed files with 9 additions and 4 deletions

View File

@ -133,7 +133,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</a>
<div class="dropdown-divider"></div>
<?php } ?>
<a class="dropdown-item text-danger text-bold" href="post.php?delete_quote=<?php echo $quote_id; ?>">
<a class="dropdown-item text-danger text-bold" href="post.php?delete_quote=<?php echo $quote_id; ?>&client_id=<?php echo $client_id; ?>">
<i class="fas fa-fw fa-trash mr-2"></i>Delete
</a>
</div>

View File

@ -3298,7 +3298,12 @@ if(isset($_GET['delete_quote'])){
$_SESSION['alert_message'] = "Quotes deleted";
header("Location: " . $_SERVER["HTTP_REFERER"]);
if(isset($_GET['client_id'])) {
$client_id = intval($_GET['client_id']);
header("Location: client_quotes.php?client_id=$client_id");
} else {
header("Location: quotes.php");
}
}

View File

@ -176,8 +176,8 @@ if (isset($_GET['quote_id'])) {
<i class="fa fa-fw fa-link text-secondary mr-2"></i>Guest URL
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-danger" href="#">
<i class="fa fa-fw fa-times text-danger text-bold mr-2"></i>Delete
<a class="dropdown-item text-danger text-bold" href="post.php?delete_quote=<?php echo $quote_id; ?>">
<i class="fa fa-fw fa-times mr-2"></i>Delete
</a>
</div>
</div>