From: moisseev Date: Mon, 18 Apr 2022 14:44:12 +0000 (+0300) Subject: [Minor] Use existing constant X-Git-Tag: 3.3~305^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27cea48502b50c4ed8f9f56ed7daeecbb80e9ebf;p=thirdparty%2Frspamd.git [Minor] Use existing constant --- diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index 0fe64ecb63..a8a904fd37 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -409,7 +409,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, (function initSettings() { var selected_locale = null; var custom_locale = null; - var localeTextbox = ".popover #settings-popover #locale"; + const localeTextbox = ".popover #settings-popover #locale"; function validateLocale(saveToLocalStorage) { function toggle_form_group_class(remove, add) { @@ -472,7 +472,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, localStorage.setItem("selected_locale", selected_locale); validateLocale(); }); - $(document).on("input", ".popover #settings-popover #locale", function () { + $(document).on("input", localeTextbox, function () { custom_locale = $(localeTextbox).val(); validateLocale(true); });