summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2014-01-27 04:30:06 -0800
committerMorris Jobke <morris.jobke@gmail.com>2014-01-27 04:30:06 -0800
commitd182b4f59fd7b172764a4d802dbd3ee6a953ea39 (patch)
tree23cfbe688605e1abba2a5e287f5f5b63b2ba44d4 /settings
parentb4d11df843de44c4999d2aa4ced66ffed9ae2a6b (diff)
parent6bb27ea76bc007908a1b48b7ee8441347f84296b (diff)
downloadnextcloud-server-d182b4f59fd7b172764a4d802dbd3ee6a953ea39.tar.gz
nextcloud-server-d182b4f59fd7b172764a4d802dbd3ee6a953ea39.zip
Merge pull request #6927 from owncloud/enc_dont_reload_page_on_decrypt
remove the form, it isn't needed here
Diffstat (limited to 'settings')
-rw-r--r--settings/js/personal.js10
-rw-r--r--settings/templates/personal.php42
2 files changed, 27 insertions, 25 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index aa55832469c..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,13 +284,13 @@ 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);
}
- }
- );
+ });
}
-}
+};
OC.Encryption.msg={
startDecrypting:function(selector){
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 07d75587d5e..31ae3a991b6 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -148,29 +148,27 @@ if($_['passwordChangeSupported']) {
};?>
<?php if($_['enableDecryptAll']): ?>
-<form id="decryptAll">
- <fieldset class="personalblock">
- <h2>
- <?php p( $l->t( 'Encryption' ) ); ?>
- </h2>
- <?php p($l->t( "The encryption app is no longer enabled, please decrypt all your files" )); ?>
- <p>
- <input
- type="password"
- name="privateKeyPassword"
- id="privateKeyPassword" />
- <label for="privateKeyPassword"><?php p($l->t( "Log-in password" )); ?></label>
- <br />
- <button
- type="button"
- disabled
- name="submitDecryptAll"><?php p($l->t( "Decrypt all Files" )); ?>
- </button>
- <span class="msg"></span>
- </p>
+<fieldset class="personalblock" id="decryptAll">
+ <h2>
+ <?php p( $l->t( 'Encryption' ) ); ?>
+ </h2>
+ <?php p($l->t( "The encryption app is no longer enabled, please decrypt all your files" )); ?>
+ <p>
+ <input
+ type="password"
+ name="privateKeyPassword"
+ id="privateKeyPassword" />
+ <label for="privateKeyPassword"><?php p($l->t( "Log-in password" )); ?></label>
<br />
- </fieldset>
-</form>
+ <button
+ type="button"
+ disabled
+ name="submitDecryptAll"><?php p($l->t( "Decrypt all Files" )); ?>
+ </button>
+ <span class="msg"></span>
+ </p>
+ <br />
+</fieldset>
<?php endif; ?>
<fieldset class="personalblock">