mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-18 00:05:12 +01: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.doLogOut = doLogOut;
|
||||||
|
|
||||||
vm.signInTIP = false;
|
vm.signInTIP = false;
|
||||||
|
|
||||||
|
$scope.user = {};
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
vm.hasError = false;
|
vm.hasError = false;
|
||||||
vm.errorMessage = '';
|
vm.errorMessage = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSignIn(user) {
|
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.hasError = true;
|
||||||
vm.errorMessage = 'username_and_password_are_required';
|
vm.errorMessage = 'username_and_password_are_required';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user