Browse Source

Merge pull request #10599 from owncloud/move_passwordchange_text

Make the password changed msg inline to fix #10242
tags/v8.1.0alpha1
Lukas Reschke 9 years ago
parent
commit
e5c6af5102
4 changed files with 17 additions and 9 deletions
  1. 4
    0
      core/css/fixes.css
  2. 0
    2
      settings/css/settings.css
  3. 9
    4
      settings/js/personal.js
  4. 4
    3
      settings/templates/personal.php

+ 4
- 0
core/css/fixes.css View File

@@ -20,6 +20,10 @@ select {
background-image: url('../img/actions/delete-hover.png');
}

.ie8 .icon-checkmark {
background-image: url('../img/actions/checkmark.png');
}

.lte9 .icon-triangle-e {
background-image: url('../img/actions/triangle-e.png');
}

+ 0
- 2
settings/css/settings.css View File

@@ -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; }

+ 9
- 4
settings/js/personal.js View File

@@ -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;
}


+ 4
- 3
settings/templates/personal.php View File

@@ -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" />

Loading…
Cancel
Save