aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-01-24 12:05:14 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-01-24 12:15:06 +0100
commit6bb27ea76bc007908a1b48b7ee8441347f84296b (patch)
tree44107e05a0dbb5b2b4a5bb29765b944580d81a92 /settings
parent2a3cb7ac5ba5a958b212de86dea62735c3f9d503 (diff)
downloadnextcloud-server-6bb27ea76bc007908a1b48b7ee8441347f84296b.tar.gz
nextcloud-server-6bb27ea76bc007908a1b48b7ee8441347f84296b.zip
disable button and input field during decryption
Diffstat (limited to 'settings')
-rw-r--r--settings/js/personal.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 57b69fd7b69..e6e1d538a19 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -206,6 +206,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);
});
@@ -214,6 +216,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 {
@@ -280,6 +284,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);
}