diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-05-28 20:13:07 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-06-13 15:34:52 +0200 |
commit | 218d0add36f873e7cdfdd32608883ea431eb2af9 (patch) | |
tree | 455394dcafd73e37272ae89177c34466c16de6ba /core/js | |
parent | a7fbd91e53be5f4fd68f035c999eaa3f187b9d3d (diff) | |
download | nextcloud-server-218d0add36f873e7cdfdd32608883ea431eb2af9.tar.gz nextcloud-server-218d0add36f873e7cdfdd32608883ea431eb2af9.zip |
Changes according to review
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/lostpassword.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index 0c50f858ec5..cfce4564f83 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -30,24 +30,26 @@ OC.Lostpassword = { $('#submit').trigger('click'); } else { $.post( - OC.filePath('core', 'ajax', 'password/lost'), - { + OC.filePath('core', 'ajax', 'password/lost'), + { user : $('#user').val(), proceed: $('#encrypted-continue').attr('checked') ? 'Yes' : 'No' - }, + }, OC.Lostpassword.sendLinkDone ); } }, sendLinkDone : function(result){ + var sendErrorMsg; + if (result && result.status === 'success'){ OC.Lostpassword.sendLinkSuccess(); } else { if (result && result.msg){ - var sendErrorMsg = result.msg; + sendErrorMsg = result.msg; } else { - var sendErrorMsg = OC.Lostpassword.sendErrorMsg; + sendErrorMsg = OC.Lostpassword.sendErrorMsg; } OC.Lostpassword.sendLinkError(sendErrorMsg); } @@ -80,7 +82,7 @@ OC.Lostpassword = { if ($('#password').val()){ $.post( $('#password').parents('form').attr('action'), - { + { password : $('#password').val() }, OC.Lostpassword.resetDone @@ -89,6 +91,7 @@ OC.Lostpassword = { }, resetDone : function(result){ + var resetErrorMsg; if (result && result.status === 'success'){ $.post( OC.webroot + '/', @@ -100,11 +103,11 @@ OC.Lostpassword = { ); } else { if (result && result.msg){ - var resetErrorMsg = result.msg; + resetErrorMsg = result.msg; } else if (result && result.encryption) { - var sendErrorMsg = OC.Lostpassword.encryptedMsg; + resetErrorMsg = OC.Lostpassword.encryptedMsg; } else { - var resetErrorMsg = OC.Lostpassword.resetErrorMsg; + resetErrorMsg = OC.Lostpassword.resetErrorMsg; } OC.Lostpassword.resetError(resetErrorMsg); } |