ohif-viewer/Packages/active-entry/components/forgotPassword/forgotPassword.js
Aysel Afsar 1e1c4033a6 - Refactor ActiveEntry.sigIn method
- Add own Reset password template
- Check password history and validation in Reset Password
- Add expireTimeInMinute in passwordOptions to control expire time of reset link
- Show sending notification while reset link is sent
2016-04-14 15:02:22 -04:00

37 lines
1.1 KiB
JavaScript
Executable File

//==========================================
Router.route('/forgotPassword', {
name: "forgotPassword",
template: "forgotPassword"
});
Template.forgotPassword.helpers({
getForgotPasswordMessageColor: function (){
if (ActiveEntry.errorMessages.get('forgotPassword')) {
return "color: #a94442; background-color: #f2dede; border-color: #ebccd1;"
} else {
return "color: black;"
}
},
getForgotPasswordMessage: function (){
return ActiveEntry.errorMessages.get('forgotPassword');
},
getForgotPasswordStyle: function (){
return "border: 1px solid gray";
},
forgotPasswordNotification: function() {
return ActiveEntry.successMessages.get("forgotPassword");
}
});
Template.forgotPassword.events({
"submit": function (event, template) {
event.preventDefault();
console.log('send reminder!');
ActiveEntry.successMessages.set("forgotPassword", "Your password reset email is sending...");
var emailAddress = $('#signInPageEmailInput').val();
ActiveEntry.forgotPassword(emailAddress);
}
});