Fixes: U4-2989 Username & password must be changed if login credentials are invalid in order to submit again.
This commit is contained in:
@@ -16,6 +16,16 @@
|
||||
$scope.errorMsg = "";
|
||||
|
||||
$scope.loginSubmit = function (login, password) {
|
||||
//if the login and password are not empty we need to automatically
|
||||
// validate them - this is because if there are validation errors on the server
|
||||
// then the user has to change both username & password to resubmit which isn't ideal,
|
||||
// so if they're not empty , we'l just make sure to set them to valid.
|
||||
if (login && password && login.length > 0 && password.length > 0) {
|
||||
$scope.loginForm.username.$setValidity('auth', true);
|
||||
$scope.loginForm.password.$setValidity('auth', true);
|
||||
}
|
||||
|
||||
|
||||
if ($scope.loginForm.$invalid) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user