From c7f56df0a6a6bf8ddb750c765369ba98c9823027 Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Thu, 19 Dec 2019 23:18:04 -0500 Subject: [PATCH 1/6] Disable spellcheck for some text fields, changed some input field types Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- custom_dns.php | 2 +- list.php | 2 +- queryads.php | 2 +- settings.php | 30 +++++++++++++++--------------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/custom_dns.php b/custom_dns.php index 5e594d7c..d5276329 100644 --- a/custom_dns.php +++ b/custom_dns.php @@ -17,7 +17,7 @@
- +
diff --git a/list.php b/list.php index 3f24c07c..f58cb773 100644 --- a/list.php +++ b/list.php @@ -37,7 +37,7 @@ else
- +
diff --git a/queryads.php b/queryads.php index 3c14765b..62ea890b 100644 --- a/queryads.php +++ b/queryads.php @@ -13,7 +13,7 @@
- + diff --git a/settings.php b/settings.php index 1861eb36..2f188526 100644 --- a/settings.php +++ b/settings.php @@ -297,7 +297,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
- +
@@ -418,7 +418,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
From
- disabled>
@@ -428,7 +428,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
To
- disabled>
@@ -441,7 +441,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
Router
- disabled>
@@ -477,7 +477,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
Lease time in hours
- disabled> @@ -642,9 +642,9 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" - - - + + +
- value="">
@@ -757,7 +757,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" checked>
- value="">
@@ -770,7 +770,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" checked>
- value="">
@@ -779,7 +779,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" checked>
- value="">
@@ -895,10 +895,10 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
- value=""> - value="">
@@ -1033,7 +1033,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"

Administrator Email Address

-
From c720cce6755de432bcbc699163c18c452a6c160f Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Fri, 20 Dec 2019 16:13:59 -0500 Subject: [PATCH 2/6] Disable autocorrect on top list exclusion `textarea`s Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.php b/settings.php index 2f188526..7105b5ff 100644 --- a/settings.php +++ b/settings.php @@ -952,7 +952,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
- @@ -961,7 +961,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
- From 40d7e1498e08742f422d3a7a7e0728e561a255b1 Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Sat, 21 Dec 2019 12:06:48 -0500 Subject: [PATCH 3/6] Disable autocorrect in search boxes Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/customdns.js | 8 ++++++++ scripts/pi-hole/js/network.js | 8 ++++++++ scripts/pi-hole/js/queries.js | 9 +++++++++ scripts/pi-hole/js/settings.js | 8 ++++++++ 4 files changed, 33 insertions(+) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 834211a6..6b1595f1 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -46,6 +46,14 @@ $(document).ready(function() { $('.deleteCustomDNS').on('click', deleteCustomDNS); } }); + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) }); function addCustomDNS() diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 3d82fa11..441532dc 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -170,4 +170,12 @@ $(document).ready(function() { "defaultContent": "" } ] }); + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) } ); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 1618cdc9..418986a5 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -395,4 +395,13 @@ $(document).ready(function() { } ); $("#resetButton").click( function () { tableApi.search("").draw(); $("#resetButton").hide(); } ); + + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) } ); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 364184e9..46a47b0a 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -251,4 +251,12 @@ $(document).ready(function(){ { alInfo.delay(3000).fadeOut(2000, function() { alInfo.hide(); }); } + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) }); From 1df9c4049b7d8428390c1aacdc7953d1899c2e0b Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Sat, 21 Dec 2019 14:32:02 -0500 Subject: [PATCH 4/6] There should only be one search input on each page so there doesn't need to be an array anyway, remove arrow functions as per https://github.com/pi-hole/AdminLTE/pull/1100\#pullrequestreview-335618314 Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> Remove const Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/customdns.js | 12 +++++------- scripts/pi-hole/js/network.js | 12 +++++------- scripts/pi-hole/js/queries.js | 12 +++++------- scripts/pi-hole/js/settings.js | 12 +++++------- 4 files changed, 20 insertions(+), 28 deletions(-) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 6b1595f1..22450c70 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -47,13 +47,11 @@ $(document).ready(function() { } }); // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) }); function addCustomDNS() diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 441532dc..5f50d7f7 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -171,11 +171,9 @@ $(document).ready(function() { } ] }); // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) } ); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 418986a5..8ed60c59 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -397,11 +397,9 @@ $(document).ready(function() { $("#resetButton").click( function () { tableApi.search("").draw(); $("#resetButton").hide(); } ); // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) } ); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 46a47b0a..eeb6ccfa 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -252,11 +252,9 @@ $(document).ready(function(){ alInfo.delay(3000).fadeOut(2000, function() { alInfo.hide(); }); } // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) }); From d93f1a22cba3fe27f56cb0cda658ac3c51b05b3b Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Sun, 19 Jan 2020 12:51:53 -0500 Subject: [PATCH 5/6] Remove autocorrect in search boxes on groups Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/customdns.js | 10 +++++----- scripts/pi-hole/js/groups-adlists.js | 6 ++++++ scripts/pi-hole/js/groups-clients.js | 6 ++++++ scripts/pi-hole/js/groups-domains.js | 6 ++++++ scripts/pi-hole/js/groups.js | 7 +++++++ scripts/pi-hole/js/network.js | 10 +++++----- scripts/pi-hole/js/queries.js | 10 +++++----- scripts/pi-hole/js/settings.js | 11 ++++++----- 8 files changed, 46 insertions(+), 20 deletions(-) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index d627c1e7..829640e6 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -63,11 +63,11 @@ $(document).ready(function() { } }); // Disable autocorrect in the search box - input = document.querySelector('input[type=search]'); - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); function addCustomDNS() { diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index f4c3ced7..e2d9fb2d 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -96,6 +96,12 @@ $(document).ready(function() { $("#ip-custom").val(""); $("#ip-custom").prop("disabled", $("#select option:selected").val() !== "custom"); }); + // Disable autocorrect in the search box + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); function initTable() { diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index 2de8d1d5..1bd72f4e 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -125,6 +125,12 @@ $(document).ready(function() { $("#ip-custom").val(""); $("#ip-custom").prop("disabled", $("#select option:selected").val() !== "custom"); }); + // Disable autocorrect in the search box + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); function initTable() { diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index e09d3062..b94b09c3 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -96,6 +96,12 @@ $(document).ready(function() { $("#ip-custom").val(""); $("#ip-custom").prop("disabled", $("#select option:selected").val() !== "custom"); }); + // Disable autocorrect in the search box + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); function initTable() { diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index b3af908c..f6904d1e 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -185,6 +185,13 @@ $(document).ready(function() { table.order([[0, "asc"]]).draw(); $("#resetButton").hide(); }); + + // Disable autocorrect in the search box + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); function addGroup() { diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 21988d41..eaba2450 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -191,9 +191,9 @@ $(document).ready(function() { ] }); // Disable autocorrect in the search box - input = document.querySelector('input[type=search]'); - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 31063876..06952529 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -440,9 +440,9 @@ $(document).ready(function() { $("#resetButton").hide(); }); // Disable autocorrect in the search box - input = document.querySelector('input[type=search]'); - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index f7ba4122..7fc310a4 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -258,10 +258,11 @@ $(document).ready(function() { alInfo.hide(); }); } + // Disable autocorrect in the search box - input = document.querySelector('input[type=search]'); - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) + var input = document.querySelector("input[type=search]"); + input.setAttribute("autocomplete", "off"); + input.setAttribute("autocorrect", "off"); + input.setAttribute("autocapitalize", "off"); + input.setAttribute("spellcheck", false); }); From 5924937e73c359c84ac9354f4b75582ffcef1b1c Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:53:28 -0400 Subject: [PATCH 6/6] Readd autocorrect to groups search The main groups page does not have IPs/domains - since groups typically contain words having autocorrect here makes sense Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/groups.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index f6904d1e..b3af908c 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -185,13 +185,6 @@ $(document).ready(function() { table.order([[0, "asc"]]).draw(); $("#resetButton").hide(); }); - - // Disable autocorrect in the search box - var input = document.querySelector("input[type=search]"); - input.setAttribute("autocomplete", "off"); - input.setAttribute("autocorrect", "off"); - input.setAttribute("autocapitalize", "off"); - input.setAttribute("spellcheck", false); }); function addGroup() {