diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-24 12:05:14 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-27 14:23:56 +0100 |
commit | 4c305ef459a1d64bed95b36ce2369b28a292681e (patch) | |
tree | d0101669c4c7902bad049eb2355452f6aadc54f3 /settings | |
parent | 72e308788fef0ede0828e4914932eef7f6ce1109 (diff) | |
download | nextcloud-server-4c305ef459a1d64bed95b36ce2369b28a292681e.tar.gz nextcloud-server-4c305ef459a1d64bed95b36ce2369b28a292681e.zip |
disable button and input field during decryption
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index 6502e38b01e..a5678c0602a 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -188,6 +188,8 @@ $(document).ready(function(){ $('button:button[name="submitDecryptAll"]').click(function() { var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val(); + $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true); + $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true); OC.Encryption.decryptAll(privateKeyPassword); }); @@ -196,6 +198,8 @@ $(document).ready(function(){ if (privateKeyPassword !== '' ) { $('#decryptAll button:button[name="submitDecryptAll"]').removeAttr("disabled"); if(event.which === 13) { + $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true); + $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true); OC.Encryption.decryptAll(privateKeyPassword); } } else { @@ -251,6 +255,7 @@ OC.Encryption = { $.post('ajax/decryptall.php', {password:password}, function(data) { if (data.status === "error") { OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data); + $('#decryptAll input:password[name="privateKeyPassword"]').removeAttr("disabled"); } else { OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data); } |