From a7c2ee3ce665f09cb22d7615c179aec35df64760 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Wed, 17 Oct 2018 23:05:09 -0400 Subject: [PATCH] Hide WebUI text input for custom monitor save locations --- src/webui/www/private/preferences_content.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/webui/www/private/preferences_content.html b/src/webui/www/private/preferences_content.html index c2451b70d..a24fefc75 100644 --- a/src/webui/www/private/preferences_content.html +++ b/src/webui/www/private/preferences_content.html @@ -133,7 +133,7 @@ - + Add @@ -795,33 +795,31 @@ changeWatchFolderSelect = function(item) { if (item.value == "other") { + item.nextElementSibling.hidden = false; item.nextElementSibling.value = 'QBT_TR(Type folder here)QBT_TR[CONTEXT=HttpServer]'; item.nextElementSibling.select(); } else { + item.nextElementSibling.hidden = true; var text = item.options[item.selectedIndex].innerHTML; item.nextElementSibling.value = text; } }; - changeWatchFolderText = function(item) { - item.previousElementSibling.value = 'other'; - }; - pushWatchFolder = function(pos, folder, sel, other) { var myinput = ""; + var disableInput = (sel != "other"); var mycb = "
" + "" - + "
"; + + ""; WatchedFoldersTable.push([myinput, mycb]); $('cb_watch_' + pos).setProperty('value', sel); - if (sel != "other") { + if (disableInput) { var elt = $('cb_watch_' + pos); other = elt.options[elt.selectedIndex].innerHTML; }