aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-24 11:54:17 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-24 11:54:17 +0100
commite5c6af51027f786d74f859584f0aa6c85db6ead6 (patch)
tree8435e257caf79adacb96ce0a591dd48050a81155 /settings
parentda8e34cf7f31ae6b560fabdd9c59179b4e1f4f0a (diff)
parent4b2d80a34b9ee11be2cf4641d2c99056a1a44b9b (diff)
downloadnextcloud-server-e5c6af51027f786d74f859584f0aa6c85db6ead6.tar.gz
nextcloud-server-e5c6af51027f786d74f859584f0aa6c85db6ead6.zip
Merge pull request #10599 from owncloud/move_passwordchange_text
Make the password changed msg inline to fix #10242
Diffstat (limited to 'settings')
-rw-r--r--settings/css/settings.css2
-rw-r--r--settings/js/personal.js13
-rw-r--r--settings/templates/personal.php7
3 files changed, 13 insertions, 9 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css
index 57edc18bd9a..f7da029d7e4 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -25,8 +25,6 @@ input#openid, input#webdav { width:20em; }
font-weight: bold;
}
-#passworderror { display:none; }
-#passwordchanged { display:none; }
#displaynameerror { display:none; }
#displaynamechanged { display:none; }
input#identity { width:20em; }
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 1202d9743d2..e2fb6f025f1 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -182,20 +182,25 @@ $(document).ready(function () {
if (data.status === "success") {
$('#pass1').val('');
$('#pass2').val('');
- $('#passwordchanged').show();
+ // Hide a possible errormsg and show successmsg
+ $('#password-changed').removeClass('hidden').addClass('inlineblock');
+ $('#password-error').removeClass('inlineblock').addClass('hidden');
} else {
if (typeof(data.data) !== "undefined") {
$('#passworderror').html(data.data.message);
} else {
$('#passworderror').html(t('Unable to change password'));
}
- $('#passworderror').show();
+ // Hide a possible successmsg and show errormsg
+ $('#password-changed').removeClass('inlineblock').addClass('hidden');
+ $('#password-error').removeClass('hidden').addClass('inlineblock');
}
});
return false;
} else {
- $('#passwordchanged').hide();
- $('#passworderror').show();
+ // Hide a possible successmsg and show errormsg
+ $('#password-changed').removeClass('inlineblock').addClass('hidden');
+ $('#password-error').removeClass('hidden').addClass('inlineblock');
return false;
}
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index f48737b6db7..5c737f84412 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -69,9 +69,10 @@ if($_['passwordChangeSupported']) {
script('jquery-showpassword');
?>
<form id="passwordform" class="section">
- <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>
+ <h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
+ <div class="hidden icon-checkmark" id="password-changed"></div>
+ <div class="hidden" id="password-error"><?php p($l->t('Unable to change your password'));?></div>
+ <br>
<input type="password" id="pass1" name="oldpassword"
placeholder="<?php echo $l->t('Current password');?>"
autocomplete="off" autocapitalize="off" autocorrect="off" />