diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 8f759bf..7c2d8a6 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -70,7 +70,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.shapestyleFillBorderColor = "black";
$rootScope.shapestyleborderWidth = 2;
$rootScope.shapestyleborderStyles = "solid";
-
+ $rootScope.errorMassage = '';
$rootScope.userInfo = {
username: null,
@@ -98,8 +98,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.AuthenticateUser = function (userInfo) {
if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) {
- alert(LoginMessageConstants.USER_CREDENTIALS_MISSING);
-
+ // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING);
+ $rootScope.errorMassage = LoginMessageConstants.USER_CREDENTIALS_MISSING;
+ $("#messageModal").modal('show');
}
else {
@@ -115,12 +116,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
{
if (result == LoginConstants.USER_NOT_FOUND) {
$rootScope.isVisibleLogin = true;
- alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
+ // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
+ $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT;
+ $("#messageModal").modal('show');
}
else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
- alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ //alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
$rootScope.isVisibleLogin = true;
+ $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
}
else {
if (result.loginId != undefined || result.loginId != "" || result.loginId != null) {
@@ -136,8 +141,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
},
function (error) {
console.log(' Error in authentication = ' + error.statusText);
- alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
$rootScope.isVisibleLogin = true;
+ $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
});
}
@@ -194,13 +201,19 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
AuthenticationService.SendMailToUser(userInfo)
.then(function (result) {
if (result == LoginConstants.USER_NOT_FOUND) {
- alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
+ // alert(LoginMessageConstants.INCORRECT_EMAIL_ID);
+ $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID;
+ $("#messageModal").modal('show');
}
else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
- alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
}
else if (result == LoginConstants.MAIL_NOT_SENT) {
- alert(LoginMessageConstants.MAIL_NOT_SENT);
+ // alert(LoginMessageConstants.MAIL_NOT_SENT);
+ $rootScope.errorMassage = LoginMessageConstants.MAIL_NOT_SENT;
+ $("#messageModal").modal('show');
}
else {
if (result.loginId != undefined || result.loginId != "" || result.loginId != null) {
@@ -217,8 +230,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
message = LoginMessageConstants.RESET_PASSWORD;
else
message = LoginMessageConstants.USERID_SENT_IN_EMAIL
- alert(message);
-
+ //alert(message);
+ $rootScope.errorMassage = message;
+ $("#messageModal").modal('show');
+
}
}
@@ -226,15 +241,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
},
function (error) {
console.log(' Error in authentication = ' + error.statusText);
- alert(LoginConstants.ERROR_IN_FECTHING_DETAILS);
+ // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS);
+ $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
});
}
else {
- alert(LoginMessageConstants.INCORRECT_EMAIL_ID);
+ // alert(LoginMessageConstants.INCORRECT_EMAIL_ID);
+ $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID;
+ $("#messageModal").modal('show');
}
}
else {
- alert(LoginMessageConstants.BLANK_EMAIL_ID);
+ //alert(LoginMessageConstants.BLANK_EMAIL_ID);
+ $rootScope.errorMassage = LoginMessageConstants.BLANK_EMAIL_ID;
+ $("#messageModal").modal('show');
+
}
};
@@ -266,14 +288,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
.then(
function (result) {
if (result == LoginConstants.USER_NOT_FOUND) {
- alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
+ // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
+ $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT;
+ $("#messageModal").modal('show');
+
}
else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
- alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
+
}
else {
if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) {
- alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE);
+ // alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE);
+ $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
$rootScope.isVisibleLogin = true;
$rootScope.isVisibleResetPass = false;
$location.url("/") ;
@@ -282,11 +312,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
},
function (error) {
console.log(' Error in authentication = ' + error.statusText);
- alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
+ $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
+ $("#messageModal").modal('show');
+
});
}
else {
$rootScope.errorMesaage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH;
+ $("#messageModal").modal('show');
}
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
index 8432934..496a699 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -293,11 +293,14 @@ AIA.constant("LoginMessageConstants", {
"USERID_SENT_IN_EMAIL": "Please check you email, sent UserId in your email.",
"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
"MAIL_NOT_SENT": "We are facing some issue in sending email. Please try after sometime.",
- "INCORRECT_EMAIL_ID": "Please enter correct email id",
- "BLANK_EMAIL_ID": "Please enter your email id",
+ "INCORRECT_EMAIL_ID": "Please enter correct email id.",
+ "BLANK_EMAIL_ID": "Please enter your email id.",
"PASSWORD_RESET_MESSAGE": "Your password has been reset.",
"NEW_AND_OLD_PASSWORD_DONOT_MATCH": "Your new password and confirm password not matched!",
- "USER_CREDENTIALS_MISSING":"Please Enter your credentials"
+ "USER_CREDENTIALS_MISSING": "Please Enter your credentials.",
+ "USER_NOT_FOUND": "User not found.",
+ //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
+ //"MAIL_NOT_SENT": "Mail not sent."
})
AIA.constant("UserModules", [
diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html
index 5f4b719..8b56ede 100644
--- a/400-SOURCECODE/AIAHTML5.Web/index.html
+++ b/400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1144,129 +1144,20 @@
-
+