mirror of
https://github.com/nextcloud/server.git
synced 2026-05-25 02:34:12 -04:00
disable button and input field during decryption
This commit is contained in:
parent
72e308788f
commit
4c305ef459
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue