disable button and input field during decryption
This commit is contained in:
parent
2a3cb7ac5b
commit
6bb27ea76b
|
@ -206,6 +206,8 @@ $(document).ready(function(){
|
||||||
|
|
||||||
$('button:button[name="submitDecryptAll"]').click(function() {
|
$('button:button[name="submitDecryptAll"]').click(function() {
|
||||||
var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val();
|
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);
|
OC.Encryption.decryptAll(privateKeyPassword);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -214,6 +216,8 @@ $(document).ready(function(){
|
||||||
if (privateKeyPassword !== '' ) {
|
if (privateKeyPassword !== '' ) {
|
||||||
$('#decryptAll button:button[name="submitDecryptAll"]').removeAttr("disabled");
|
$('#decryptAll button:button[name="submitDecryptAll"]').removeAttr("disabled");
|
||||||
if(event.which === 13) {
|
if(event.which === 13) {
|
||||||
|
$('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true);
|
||||||
|
$('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true);
|
||||||
OC.Encryption.decryptAll(privateKeyPassword);
|
OC.Encryption.decryptAll(privateKeyPassword);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -280,6 +284,7 @@ OC.Encryption = {
|
||||||
$.post('ajax/decryptall.php', {password:password}, function(data) {
|
$.post('ajax/decryptall.php', {password:password}, function(data) {
|
||||||
if (data.status === "error") {
|
if (data.status === "error") {
|
||||||
OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data);
|
OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data);
|
||||||
|
$('#decryptAll input:password[name="privateKeyPassword"]').removeAttr("disabled");
|
||||||
} else {
|
} else {
|
||||||
OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data);
|
OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue