mirror of
https://github.com/goharbor/harbor
synced 2025-05-18 16:06:29 +00:00
Merge pull request #1108 from wknet123/dev-optimize-sign-in
Updates for sign in form data check.
This commit is contained in:
commit
c221ce7b49
@ -36,14 +36,17 @@
|
||||
vm.doLogOut = doLogOut;
|
||||
|
||||
vm.signInTIP = false;
|
||||
|
||||
$scope.user = {};
|
||||
|
||||
function reset() {
|
||||
vm.hasError = false;
|
||||
vm.errorMessage = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function doSignIn(user) {
|
||||
if($scope.user.principal.length === 0 || $scope.user.password.length === 0) {
|
||||
if(!$scope.user.principal || !$scope.user.password ||
|
||||
$scope.user.principal.length === 0 || $scope.user.password.length === 0) {
|
||||
vm.hasError = true;
|
||||
vm.errorMessage = 'username_and_password_are_required';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user