Use toastr notifications and alerts instead dedupe alert feedback code

This commit is contained in:
johnnyq
2022-05-14 13:03:03 -04:00
parent 205c4e1bec
commit 334766e567
7 changed files with 16 additions and 40 deletions

View File

@@ -3,15 +3,14 @@
//Alert Feedback
if(!empty($_SESSION['alert_message'])){
if (!isset($_SESSION['alert_type'])){
$_SESSION['alert_type'] = "info";
$_SESSION['alert_type'] = "success";
}
?>
<div class="alert alert-<?php echo $_SESSION['alert_type']; ?>" id="alert">
<?php echo $_SESSION['alert_message']; ?>
<button class='close' data-dismiss='alert'>&times;</button>
</div>
<script type="text/javascript">toastr.<?php echo $_SESSION['alert_type']; ?>("<?php echo $_SESSION['alert_message']; ?>")</script>
<?php
unset($_SESSION['alert_type']);
unset($_SESSION['alert_message']);