diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 15:37:26 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 15:41:40 +0100 |
commit | 87bc02c6cd482a28aa175d269d48a849ca9eb399 (patch) | |
tree | f8e6d45d2f773f3c73a0393b921677178c56b5d2 /core/js/lostpassword.js | |
parent | f8f3c9ecf9da1f14722f6d3266a0e80ea157f98f (diff) | |
download | nextcloud-server-87bc02c6cd482a28aa175d269d48a849ca9eb399.tar.gz nextcloud-server-87bc02c6cd482a28aa175d269d48a849ca9eb399.zip |
Allow specifying a custom reset-password-url
Diffstat (limited to 'core/js/lostpassword.js')
-rw-r--r-- | core/js/lostpassword.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index 294a9d8c1cf..df28c2308cb 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -13,22 +13,26 @@ OC.Lostpassword = { resetErrorMsg : t('core', 'Password can not be changed. Please contact your administrator.'), init : function() { - $('#lost-password').click(OC.Lostpassword.sendLink); + $('#lost-password').click(OC.Lostpassword.resetLink); $('#reset-password #submit').click(OC.Lostpassword.resetPassword); }, - sendLink : function(event){ + resetLink : function(event){ event.preventDefault(); if (!$('#user').val().length){ $('#submit').trigger('click'); } else { - $.post( + if (OC.config['lost_password_link']) { + window.location = OC.config['lost_password_link']; + } else { + $.post( OC.generateUrl('/lostpassword/email'), { user : $('#user').val() }, OC.Lostpassword.sendLinkDone - ); + ); + } } }, |