diff --git a/core/css/guest.css b/core/css/guest.css index 4741339e18..e55874f3e0 100644 --- a/core/css/guest.css +++ b/core/css/guest.css @@ -393,9 +393,6 @@ form .warning input[type='checkbox']+label { width: 100%; text-shadow: 0 0 2px rgba(0, 0, 0, .4); // better readability on bright background } -.lost-password-container { - margin: 0; -} .lost-password-container #lost-password, .lost-password-container #lost-password-back { display: inline-block; diff --git a/core/js/login.js b/core/js/login.js index 81ef25ef2d..09e7499e81 100644 --- a/core/js/login.js +++ b/core/js/login.js @@ -12,7 +12,7 @@ */ OC.Login = _.extend(OC.Login || {}, { onLogin: function () { - $('#submit-icon') + $('#submit-wrapper .submit-icon') .removeClass('icon-confirm-white') .addClass('icon-loading-small'); $('#submit') diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index 58102d2485..6c34e7b40f 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -16,6 +16,11 @@ OC.Lostpassword = { $('#lost-password').click(OC.Lostpassword.resetLink); $('#reset-password-submit').click(OC.Lostpassword.resetPassword); $('#lost-password-back').click(OC.Lostpassword.backToLogin); + $('#reset-password-wrapper .submit-icon') + .addClass('icon-confirm-white') + .removeClass('icon-loading-small'); + $('#reset-password-submit') + .attr('value', t('core', 'Reset password')); }, backToLogin : function(event){ @@ -41,7 +46,8 @@ OC.Lostpassword = { $('#reset-password-wrapper').slideDown().fadeIn(); $('#user').focus(); - if (!$('#user').val().length){ + // Generate a browser warning if field empty + if ($('#user').val().length === 0) { $('#submit').trigger('click'); } else { if (OC.config.lost_password_link === 'disabled') { @@ -49,6 +55,7 @@ OC.Lostpassword = { } else if (OC.config.lost_password_link) { window.location = OC.config.lost_password_link; } else { + OC.Lostpassword.onSendLink(); $.post( OC.generateUrl('/lostpassword/email'), { @@ -62,6 +69,15 @@ OC.Lostpassword = { } }, + onSendLink: function () { + $('.submit-icon') + .removeClass('icon-confirm-white') + .addClass('icon-loading-small'); + $('#reset-password-submit') + .attr('value', t('core', 'Sending email …')); + return true; + }, + sendLinkDone : function(result){ var sendErrorMsg;