]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Use existing constant
authormoisseev <moiseev@mezonplus.ru>
Mon, 18 Apr 2022 14:44:12 +0000 (17:44 +0300)
committermoisseev <moiseev@mezonplus.ru>
Mon, 18 Apr 2022 14:44:12 +0000 (17:44 +0300)
interface/js/app/rspamd.js

index 0fe64ecb639a97b088ad354c277662b2a3b91fff..a8a904fd37d95e0a2468a5063f1004af665cc2c0 100644 (file)
@@ -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);
             });