mirror of
https://github.com/itflow-org/itflow
synced 2026-03-06 13:54:51 +00:00
Use toastr notifications and alerts instead dedupe alert feedback code
This commit is contained in:
@@ -11,9 +11,11 @@
|
|||||||
<!-- Page Content -->
|
<!-- Page Content -->
|
||||||
<h1>Blank Page</h1>
|
<h1>Blank Page</h1>
|
||||||
<hr>
|
<hr>
|
||||||
<p>This is a great starting point for new custom pages.
|
<p>This is a great starting point for new custom pages.</p>
|
||||||
|
|
||||||
<?php echo CURRENT_DATABASE_VERSION; ?>
|
<?php echo CURRENT_DATABASE_VERSION; ?>
|
||||||
</p>
|
|
||||||
|
<script>toastr.success('Have Fun Wozz')</script>
|
||||||
|
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php include("footer.php"); ?>
|
||||||
@@ -7,13 +7,11 @@
|
|||||||
<!-- ./wrapper -->
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
<!-- REQUIRED SCRIPTS -->
|
<!-- REQUIRED SCRIPTS -->
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="plugins/jquery/jquery.min.js"></script>
|
|
||||||
<!-- Bootstrap 4 -->
|
<!-- Bootstrap 4 -->
|
||||||
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||||
<!-- Custom js-->
|
<!-- Custom js-->
|
||||||
<script src="plugins/toastr/toastr.min.js"></script>
|
|
||||||
<script src="plugins/moment/moment.min.js"></script>
|
<script src="plugins/moment/moment.min.js"></script>
|
||||||
<script src="plugins/chart.js/Chart.min.js"></script>
|
<script src="plugins/chart.js/Chart.min.js"></script>
|
||||||
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ header("X-Frame-Options: DENY");
|
|||||||
<link href="plugins/summernote/summernote-bs4.min.css" rel="stylesheet">
|
<link href="plugins/summernote/summernote-bs4.min.css" rel="stylesheet">
|
||||||
<link href="plugins/toastr/toastr.min.css" rel="stylesheet">
|
<link href="plugins/toastr/toastr.min.css" rel="stylesheet">
|
||||||
<!-- <link href="plugins/dropzone/min/dropzone.min.css" rel="stylesheet"> -->
|
<!-- <link href="plugins/dropzone/min/dropzone.min.css" rel="stylesheet"> -->
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="plugins/jquery/jquery.min.js"></script>
|
||||||
|
<script src="plugins/toastr/toastr.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="hold-transition sidebar-mini">
|
<body class="hold-transition sidebar-mini">
|
||||||
|
|||||||
@@ -3,15 +3,14 @@
|
|||||||
//Alert Feedback
|
//Alert Feedback
|
||||||
if(!empty($_SESSION['alert_message'])){
|
if(!empty($_SESSION['alert_message'])){
|
||||||
if (!isset($_SESSION['alert_type'])){
|
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']; ?>
|
<script type="text/javascript">toastr.<?php echo $_SESSION['alert_type']; ?>("<?php echo $_SESSION['alert_message']; ?>")</script>
|
||||||
<button class='close' data-dismiss='alert'>×</button>
|
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
unset($_SESSION['alert_type']);
|
unset($_SESSION['alert_type']);
|
||||||
unset($_SESSION['alert_message']);
|
unset($_SESSION['alert_message']);
|
||||||
|
|
||||||
|
|||||||
@@ -3,29 +3,4 @@
|
|||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<div class="content mt-3">
|
<div class="content mt-3">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<?php
|
|
||||||
//Alert Feedback
|
|
||||||
if(!empty($_SESSION['alert_message'])){
|
|
||||||
if (!isset($_SESSION['alert_type'])){
|
|
||||||
$_SESSION['alert_type'] = "info";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div class="alert alert-<?php echo $_SESSION['alert_type']; ?>" id="alert">
|
|
||||||
<?php echo $_SESSION['alert_message']; ?>
|
|
||||||
<button class='close' data-dismiss='alert'>×</button>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
unset($_SESSION['alert_type']);
|
|
||||||
unset($_SESSION['alert_message']);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//Set Records Per Page
|
|
||||||
if(empty($_SESSION['records_per_page'])){
|
|
||||||
$_SESSION['records_per_page'] = 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -77,4 +77,4 @@ clipboard.on('error', function(e) {
|
|||||||
// Enable Popovers
|
// Enable Popovers
|
||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="popover"]').popover()
|
$('[data-toggle="popover"]').popover()
|
||||||
})
|
});
|
||||||
1
post.php
1
post.php
@@ -4727,7 +4727,6 @@ if(isset($_GET['undo_archive_location'])){
|
|||||||
//Logging
|
//Logging
|
||||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Location', log_action = 'Undo Archive', log_description = '$session_name unarchived location $location_name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, company_id = $session_company_id");
|
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Location', log_action = 'Undo Archive', log_description = '$session_name unarchived location $location_name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, company_id = $session_company_id");
|
||||||
|
|
||||||
$_SESSION['alert_type'] = "danger";
|
|
||||||
$_SESSION['alert_message'] = "Location ".stripslashes($location_name)." unarchived.";
|
$_SESSION['alert_message'] = "Location ".stripslashes($location_name)." unarchived.";
|
||||||
|
|
||||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user