diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/lostpassword.js | 5 | ||||
-rw-r--r-- | core/templates/login.php | 23 |
2 files changed, 15 insertions, 13 deletions
diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index bd7dc9de399..446d70d991e 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -35,6 +35,7 @@ OC.Lostpassword = { $('#reset-password-wrapper').slideUp().fadeOut(); $('#lost-password').slideDown().fadeIn(); + $('#lost-password-back').hide(); $('.remember-login-container').slideDown().fadeIn(); $('#submit-wrapper').slideDown().fadeIn(); $('.groupbottom').slideDown().fadeIn(); @@ -47,7 +48,8 @@ OC.Lostpassword = { resetLink : function(event){ event.preventDefault(); - $('#lost-password').slideUp().fadeOut(); + $('#lost-password').hide(); + $('#lost-password-back').slideDown().fadeIn(); $('.remember-login-container').slideUp().fadeOut(); $('#submit-wrapper').slideUp().fadeOut(); $('.groupbottom').slideUp().fadeOut(function(){ @@ -118,6 +120,7 @@ OC.Lostpassword = { // update is the better success message styling node.addClass('update').css({width:'auto'}); node.html(OC.Lostpassword.sendSuccessMsg); + OC.Lostpassword.resetButtons(); }, sendLinkError : function(msg){ diff --git a/core/templates/login.php b/core/templates/login.php index 2f6bce76e88..82827bbef03 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -51,11 +51,7 @@ script('core', 'merged-login'); <label for="password" class="infield"><?php p($l->t('Password')); ?></label> </p> - <?php if (!empty($_['invalidpassword']) && !empty($_['canResetPassword'])) { ?> - <a id="lost-password" class="warning" href="<?php p($_['resetPasswordLink']); ?>"> - <?php p($l->t('Wrong password. Reset it?')); ?> - </a> - <?php } else if (!empty($_['invalidpassword'])) { ?> + <?php if (!empty($_['invalidpassword'])) { ?> <p class="warning"> <?php p($l->t('Wrong password.')); ?> </p> @@ -66,6 +62,13 @@ script('core', 'merged-login'); <div class="submit-icon icon-confirm-white"></div> </div> + <?php if (!empty($_['canResetPassword'])) { ?> + <div id="reset-password-wrapper" style="display: none;"> + <input type="submit" id="reset-password-submit" class="login primary" title="" value="<?php p($l->t('Reset password')); ?>" disabled="disabled" /> + <div class="submit-icon icon-confirm-white"></div> + </div> + <?php } ?> + <div class="login-additional"> <div class="remember-login-container"> <?php if ($_['rememberLoginState'] === 0) { ?> @@ -80,13 +83,9 @@ script('core', 'merged-login'); <a id="lost-password" href="<?php p($_['resetPasswordLink']); ?>"> <?php p($l->t('Forgot password?')); ?> </a> - <div id="reset-password-wrapper" style="display: none;"> - <input type="submit" id="reset-password-submit" class="login primary" title="" value="<?php p($l->t('Reset password')); ?>" disabled="disabled" /> - <div class="submit-icon icon-confirm-white"></div> - <a id="lost-password-back" href=""> - <?php p($l->t('Back to log in')); ?> - </a> - </div> + <a id="lost-password-back" href="" style="display:none;"> + <?php p($l->t('Back to log in')); ?> + </a> </div> <?php } ?> </div> |