From f6fe0ce21c401fd7416bd1a2470ecb38c08066be Mon Sep 17 00:00:00 2001 From: sukanagaraj Date: Wed, 13 Dec 2017 11:28:09 +0530 Subject: [PATCH] to check empty entries on the login form. validating the same --- .../main/webapp/app/dev/public/js/ctrls/authCtrl.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js index e4b3329077..36093c9401 100644 --- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js +++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js @@ -26,6 +26,14 @@ $scope.password = ''; $scope.login = function () { + if (!$scope.username || !$scope.password) + { + $.dialog({ + title: 'OPS', + content: 'Username or password cannot be Empty.' + }); + + }else { Auth.login($scope.username, $scope.password).then(function (result) { if (result) { $wrapState.go('home'); @@ -35,7 +43,7 @@ content: 'Username or password not correct.' }); } - }); + }); } }; $scope.onKeyPress = function (event) {