LT-103: Show error messages if username or password are invalidated
- Remove Need An Account and Forgot Password buttons for Sign In page
This commit is contained in:
1 parent
ea307b1067
commit
506ab56711
3 files changed
+80
-10
No files matched your search
@@ -127,6 +127,26 @@ ActiveEntry.verifyFullName = function (fullName) {
|
||||
}
|
||||
};
|
||||
|
||||
ActiveEntry.verifyLDAPUsername = function(username) {
|
||||
if (username === "") {
|
||||
ActiveEntry.errorMessages.set("ldapUsername", "Username is required");
|
||||
ActiveEntry.successMessages.set("ldapUsername", null);
|
||||
} else {
|
||||
ActiveEntry.errorMessages.set("ldapUsername", null);
|
||||
ActiveEntry.successMessages.set("ldapUsername", "Username present");
|
||||
}
|
||||
};
|
||||
|
||||
ActiveEntry.verifyLDAPPassword = function(password) {
|
||||
if (password === "") {
|
||||
ActiveEntry.errorMessages.set("ldapPassword", "Password is required");
|
||||
ActiveEntry.successMessages.set("ldapPassword", null);
|
||||
} else {
|
||||
ActiveEntry.errorMessages.set("ldapPassword", null);
|
||||
ActiveEntry.successMessages.set("ldapPassword", "Password present");
|
||||
}
|
||||
};
|
||||
|
||||
ActiveEntry.signIn = function (emailValue, passwordValue){
|
||||
|
||||
ActiveEntry.verifyPassword(passwordValue);
|
||||
@@ -222,7 +242,11 @@ ActiveEntry.signIn = function (emailValue, passwordValue){
|
||||
};
|
||||
|
||||
ActiveEntry.loginWithLDAP = function(username, password) {
|
||||
if (!username || !password) {
|
||||
ActiveEntry.verifyLDAPUsername(username);
|
||||
ActiveEntry.verifyLDAPPassword(password);
|
||||
ActiveEntry.errorMessages.set('signInError', null);
|
||||
|
||||
if (ActiveEntry.errorMessages.get("ldapUsername") || ActiveEntry.errorMessages.get("ldapPassword")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user