From b6695f98826cb2025f5233f5aef094c465f436ea Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 8 Jan 2017 10:40:21 +0100 Subject: [PATCH] Show failure response in error message (e.g. abd<>.de is not a valid domain) --- list.php | 2 +- scripts/pi-hole/js/list.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/list.php b/list.php index dc8097c1..7b62afd9 100644 --- a/list.php +++ b/list.php @@ -45,7 +45,7 @@ function getFullName() { diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js index de2692ad..573cd499 100644 --- a/scripts/pi-hole/js/list.js +++ b/scripts/pi-hole/js/list.js @@ -74,6 +74,7 @@ function add() { var alInfo = $("#alInfo"); var alSuccess = $("#alSuccess"); var alFailure = $("#alFailure"); + var err = $("#err"); alInfo.show(); alSuccess.hide(); alFailure.hide(); @@ -85,10 +86,11 @@ function add() { if (response.indexOf("not a valid argument") >= 0 || response.indexOf("is not a valid domain") >= 0) { alFailure.show(); - alFailure.delay(1000).fadeOut(2000, function() { + err.html(response); + alFailure.delay(4000).fadeOut(2000, function() { alFailure.hide(); }); - alInfo.delay(1000).fadeOut(2000, function() { + alInfo.delay(4000).fadeOut(2000, function() { alInfo.hide(); }); } else {