summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2014-01-29 10:55:44 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2014-01-29 10:55:44 +0100
commit13ed59c1cf2598f28c415c0c2459b5a4495ff5ef (patch)
tree890efcfe462f19468e2aa05ca1a22049edc21ab6 /settings
parentc767ebcc03c604f3141af4c286ad099fdf64c561 (diff)
parentcf2c061f1f2577b3a995d9e2423c93589d7df2b3 (diff)
downloadnextcloud-server-13ed59c1cf2598f28c415c0c2459b5a4495ff5ef.tar.gz
nextcloud-server-13ed59c1cf2598f28c415c0c2459b5a4495ff5ef.zip
merge master into mobile-style
Diffstat (limited to 'settings')
-rw-r--r--settings/js/personal.js27
-rw-r--r--settings/templates/personal.php48
2 files changed, 48 insertions, 27 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 591eb8abe2e..e6e1d538a19 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -165,6 +165,11 @@ $(document).ready(function(){
$('#email').keyup(function(){
if ($('#email').val() !== '' ){
+ // if this is the enter key changeEmailAddress() is already invoked
+ // so it doesn't need to be triggered again
+ if(event.keyCode === 13) {
+ return;
+ }
if(typeof timeout !== 'undefined'){
clearTimeout(timeout);
}
@@ -172,6 +177,18 @@ $(document).ready(function(){
}
});
+ $('#email').keypress(function(event){
+ // check for enter key and non empty email
+ if (event.keyCode === 13 && $('#email').val() !== '' ){
+ event.preventDefault()
+ // clear timeout of previous keyup event - prevents duplicate changeEmailAddress call
+ if(typeof timeout !== 'undefined'){
+ clearTimeout(timeout);
+ }
+ changeEmailAddress();
+ }
+ });
+
$("#languageinput").change( function(){
// Serialize the data
var post = $( "#languageinput" ).serialize();
@@ -189,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);
});
@@ -197,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 {
@@ -263,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 1518b48b979..31ae3a991b6 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -39,9 +39,11 @@ if($_['passwordChangeSupported']) {
<h2><?php p($l->t('Password'));?></h2>
<div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div>
<div id="passworderror"><?php echo $l->t('Unable to change your password');?></div>
- <input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" />
+ <input type="password" id="pass1" name="oldpassword"
+ placeholder="<?php echo $l->t('Current password');?>" autocomplete="off" />
<input type="password" id="pass2" name="personal-password"
- placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" />
+ placeholder="<?php echo $l->t('New password');?>"
+ data-typetoggle="#personal-show" autocomplete="off" />
<input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
<input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
<br/>
@@ -146,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">