added forgot password feature.
This commit is contained in:
@@ -24,6 +24,31 @@ function performRegistration() {
|
||||
}
|
||||
});
|
||||
}
|
||||
function requestPasswordReset() {
|
||||
var userName = $("#inputUserName").val();
|
||||
$.post('/Login/RequestResetPassword', { userName: userName }, function (data) {
|
||||
if (data.success) {
|
||||
successToast(data.message);
|
||||
setTimeout(function () { window.location.href = '/Login/Index' }, 500);
|
||||
} else {
|
||||
errorToast(data.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
function performPasswordReset() {
|
||||
var token = $("#inputToken").val();
|
||||
var userPassword = $("#inputUserPassword").val();
|
||||
var userEmail = $("#inputEmail").val();
|
||||
$.post('/Login/PerformPasswordReset', { password: userPassword, token: token, emailAddress: userEmail }, function (data) {
|
||||
if (data.success) {
|
||||
successToast(data.message);
|
||||
setTimeout(function () { window.location.href = '/Login/Index' }, 500);
|
||||
} else {
|
||||
errorToast(data.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handlePasswordKeyPress(event) {
|
||||
if (event.keyCode == 13) {
|
||||
performLogin();
|
||||
|
||||
Reference in New Issue
Block a user