summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-05 05:45:32 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-05 05:47:34 +0100
commit6347fe86c9fbecc49c25b732da9e3ba858356b48 (patch)
tree0fafb565a62b892d5f267c26fa003f521e65ab6f
parent494dea2c60ae77cc6cbe6c481bc92a76fe5bdc9e (diff)
downloadnextcloud-server-6347fe86c9fbecc49c25b732da9e3ba858356b48.tar.gz
nextcloud-server-6347fe86c9fbecc49c25b732da9e3ba858356b48.zip
Fix loading state and error message display
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--core/css/guest.css3
-rw-r--r--core/js/login.js2
-rw-r--r--core/js/lostpassword.js18
3 files changed, 18 insertions, 5 deletions
diff --git a/core/css/guest.css b/core/css/guest.css
index 4741339e183..e55874f3e09 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 81ef25ef2d4..09e7499e811 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 58102d2485c..6c34e7b40fc 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;