diff options
-rw-r--r-- | core/js/publicshareauth.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/js/publicshareauth.js b/core/js/publicshareauth.js index 7f3f0d0a7d4..af061954506 100644 --- a/core/js/publicshareauth.js +++ b/core/js/publicshareauth.js @@ -1,9 +1,11 @@ -$(document).ready(function(){ - $('#password').on('keyup input change', function() { - if ($('#password').val().length > 0) { - $('#password-submit').prop('disabled', false); - } else { - $('#password-submit').prop('disabled', true); - } - }); +document.addEventListener('DOMContentLoaded', function() { + var passwordInput = document.getElementById('password'); + var passwordButton = document.getElementById('password-submit'); + var eventListener = function() { + passwordButton.disabled = passwordInput.value.length === 0; + }; + + passwordInput.addEventListener('click', eventListener); + passwordInput.addEventListener('keyup', eventListener); + passwordInput.addEventListener('change', eventListener); }); |