diff options
Diffstat (limited to 'js/src/server/privileges.js')
-rw-r--r-- | js/src/server/privileges.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/src/server/privileges.js b/js/src/server/privileges.js index 4522ef4065..2482e50e14 100644 --- a/js/src/server/privileges.js +++ b/js/src/server/privileges.js @@ -109,14 +109,14 @@ const AccountLocking = { } if (isLocked) { - const lockIcon = Functions.getImage('s_lock', Messages.strLock, {}).toString(); - button.innerHTML = '<span class="text-nowrap">' + lockIcon + ' ' + Messages.strLock + '</span>'; - button.title = Messages.strLockAccount; + const lockIcon = Functions.getImage('s_lock', window.Messages.strLock, {}).toString(); + button.innerHTML = '<span class="text-nowrap">' + lockIcon + ' ' + window.Messages.strLock + '</span>'; + button.title = window.Messages.strLockAccount; button.dataset.isLocked = 'false'; } else { - const unlockIcon = Functions.getImage('s_unlock', Messages.strUnlock, {}).toString(); - button.innerHTML = '<span class="text-nowrap">' + unlockIcon + ' ' + Messages.strUnlock + '</span>'; - button.title = Messages.strUnlockAccount; + const unlockIcon = Functions.getImage('s_unlock', window.Messages.strUnlock, {}).toString(); + button.innerHTML = '<span class="text-nowrap">' + unlockIcon + ' ' + window.Messages.strUnlock + '</span>'; + button.title = window.Messages.strUnlockAccount; button.dataset.isLocked = 'true'; } @@ -223,17 +223,17 @@ const RevokeUser = { var $thisButton = $(this); var $form = $('#usersForm'); - $thisButton.confirm(Messages.strDropUserWarning, $form.attr('action'), function (url) { + $thisButton.confirm(window.Messages.strDropUserWarning, $form.attr('action'), function (url) { var $dropUsersDbCheckbox = $('#dropUsersDbCheckbox'); if ($dropUsersDbCheckbox.is(':checked')) { - var isConfirmed = confirm(Messages.strDropDatabaseStrongWarning + '\n' + Functions.sprintf(Messages.strDoYouReally, 'DROP DATABASE')); + var isConfirmed = confirm(window.Messages.strDropDatabaseStrongWarning + '\n' + Functions.sprintf(window.Messages.strDoYouReally, 'DROP DATABASE')); if (! isConfirmed) { // Uncheck the drop users database checkbox $dropUsersDbCheckbox.prop('checked', false); } } - Functions.ajaxShowMessage(Messages.strRemovingSelectedUsers); + Functions.ajaxShowMessage(window.Messages.strRemovingSelectedUsers); var argsep = window.CommonParams.get('arg_separator'); $.post(url, $form.serialize() + argsep + 'delete=' + $thisButton.val() + argsep + 'ajax_request=true', function (data) { @@ -289,7 +289,7 @@ const ExportPrivileges = { event.preventDefault(); // can't export if no users checked if ($(this.form).find('input:checked').length === 0) { - Functions.ajaxShowMessage(Messages.strNoAccountSelected, 2000, 'success'); + Functions.ajaxShowMessage(window.Messages.strNoAccountSelected, 2000, 'success'); return; } var msgbox = Functions.ajaxShowMessage(); @@ -444,13 +444,13 @@ const CheckAddUser = { const theForm = this; if (theForm.elements.hostname.value === '') { - alert(Messages.strHostEmpty); + alert(window.Messages.strHostEmpty); theForm.elements.hostname.focus(); return false; } if ((theForm.elements.pred_username && theForm.elements.pred_username.value === 'userdefined') && theForm.elements.username.value === '') { - alert(Messages.strUserEmpty); + alert(window.Messages.strUserEmpty); theForm.elements.username.focus(); return false; } |