- Renamed validatePassword method, usePwstrength and useZxcvbn,
- Moved passwordOptions from settings.json to ActiveEntry configuration object - Used zxcvbn rule set if showPasswordStrengthIndicator is true, used regular expression rule set if showPasswordStrengthIndicator is false
This commit is contained in:
1 parent
4e986c8395
commit
e659f0f4b3
17 files changed
+165
-102
No files matched your search
@@ -57,7 +57,7 @@ Template.entrySignIn.helpers({
|
||||
getPasswordValidationStyling: function () {
|
||||
if (ActiveEntry.errorMessages.equals('password', "Password is required")) {
|
||||
return "border: 1px solid #a94442";
|
||||
} else if (ActiveEntry.errorMessages.equals('password', "Password must have at least 8 characters. It must contain at least 1 uppercase, 1 lowercase, 1 number and 1 special character.")) {
|
||||
} else if (ActiveEntry.errorMessages.equals('password', Session.get('passwordWarning'))) {
|
||||
return "border: 1px solid #f2dede";
|
||||
} else if (ActiveEntry.successMessages.equals('password', "Password present")) {
|
||||
return "border: 1px solid green";
|
||||
@@ -117,7 +117,6 @@ Template.entrySignIn.events({
|
||||
// ActiveEntry.signIn(emailValue, passwordValue);
|
||||
// },
|
||||
'click #signInToAppButton': function (event, template){
|
||||
console.log('click #signInToAppButton');
|
||||
ActiveEntry.reset();
|
||||
// var emailValue = template.$('[name=email]').val();
|
||||
// var passwordValue = template.$('[name=password]').val();
|
||||
@@ -126,6 +125,18 @@ Template.entrySignIn.events({
|
||||
|
||||
ActiveEntry.signIn(emailValue, passwordValue);
|
||||
event.preventDefault();
|
||||
},
|
||||
'keypress #entrySignIn': function(event, template) {
|
||||
if(event.keyCode == 13) {
|
||||
ActiveEntry.verifyEmail($("#signInPageEmailInput").val());
|
||||
ActiveEntry.verifyPassword($("#signInPagePasswordInput").val());
|
||||
|
||||
if (!ActiveEntry.errorMessages.get('signInError') &&
|
||||
ActiveEntry.successMessages.get('email') &&
|
||||
ActiveEntry.successMessages.get('password')) {
|
||||
$("#signInToAppButton").click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user