diff options
author | kondou <kondou@ts.unde.re> | 2014-08-22 16:48:21 +0200 |
---|---|---|
committer | Christopher Schäpers <christopher@schaepers.it> | 2015-02-11 14:27:05 +0100 |
commit | 95cfe292f40948d3c3b1f1ceb6ca8c9099226ef1 (patch) | |
tree | 0584abe96b3f3057ebec71245ddc94215dd4a5d8 | |
parent | 9baf7a0a3f76e876308cd52fc0c0c30d2b8c9478 (diff) | |
download | nextcloud-server-95cfe292f40948d3c3b1f1ceb6ca8c9099226ef1.tar.gz nextcloud-server-95cfe292f40948d3c3b1f1ceb6ca8c9099226ef1.zip |
Make the password changed msg inline to fix #10242
-rw-r--r-- | settings/css/settings.css | 2 | ||||
-rw-r--r-- | settings/js/personal.js | 13 | ||||
-rw-r--r-- | settings/templates/personal.php | 7 |
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 0cf0cd81a7b..a157c1b5c0c 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 3bd5971f44e..300ade5e3f3 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" /> |