From 07987b5a04475baff18a219ab44f3d10f280bd82 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 13 Dec 2016 12:56:04 +0100 Subject: [PATCH] Add info boxes --- js/pihole/settings.js | 7 +++++++ php/savesettings.php | 3 +++ settings.php | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/js/pihole/settings.js b/js/pihole/settings.js index dd751ac1..67c60099 100644 --- a/js/pihole/settings.js +++ b/js/pihole/settings.js @@ -68,3 +68,10 @@ $(document).ready(function() { }); } } ); + +// Handle hiding of alerts +$(function(){ + $("[data-hide]").on("click", function(){ + $(this).closest("." + $(this).attr("data-hide")).hide(); + }); +}); diff --git a/php/savesettings.php b/php/savesettings.php index df105320..f0581b7f 100644 --- a/php/savesettings.php +++ b/php/savesettings.php @@ -191,14 +191,17 @@ function validDomain($domain_name) case "reboot": exec("sudo pihole -a reboot"); + $success = "The system will reboot in 5 seconds..."; break; case "restartdns": exec("sudo pihole -a restartdns"); + $success = "The DNS server has been restarted"; break; case "flushlogs": exec("sudo pihole -f"); + $success = "The Pi-Hole log file has been flushed"; break; case "DHCP": diff --git a/settings.php b/settings.php index f9f636a2..2766bcc8 100644 --- a/settings.php +++ b/settings.php @@ -4,6 +4,13 @@ // Reread ini file as things might have been changed $setupVars = parse_ini_file("/etc/pihole/setupVars.conf"); ?> + + + + +

Debug output:

Error output: