From 197592a97ca7b29b376a14a5b37f48c23e5db1b3 Mon Sep 17 00:00:00 2001 From: Rick Boss Date: Wed, 7 Oct 2020 22:28:28 -0700 Subject: [PATCH] Ensure UI is reenabled in missed error cases Signed-off-by: Rick Boss --- scripts/pi-hole/js/groups-adlists.js | 2 ++ scripts/pi-hole/js/groups.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 606820b3..2126f4b7 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -219,6 +219,8 @@ function addAdlist() { utils.showAlert("info", "", "Adding adlist...", address); if (address.length === 0) { + // enable the ui elements again + utils.enableAll(); utils.showAlert("warning", "", "Warning", "Please specify an adlist address"); return; } diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index f59dd1b0..d715e041 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -134,6 +134,8 @@ function addGroup() { utils.showAlert("info", "", "Adding group...", name); if (name.length === 0) { + // enable the ui elements again + utils.enableAll(); utils.showAlert("warning", "", "Warning", "Please specify a group name"); return; }