Commit b53e001093cbc0094dfa2b0128bde4e7a392a7d8

Authored by Utkarsh Singh
1 parent 28a85418

Committed code, Refs: #17181, 17182

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -68,7 +68,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -68,7 +68,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
68 $rootScope.shapestyleFillBorderColor = "black"; 68 $rootScope.shapestyleFillBorderColor = "black";
69 $rootScope.shapestyleborderWidth = 2; 69 $rootScope.shapestyleborderWidth = 2;
70 $rootScope.shapestyleborderStyles = "solid"; 70 $rootScope.shapestyleborderStyles = "solid";
71 - $rootScope.errorMassage = ''; 71 + //$rootScope.errorMessage = '';
72 $rootScope.disableFileMenu = "disableFileMenu"; 72 $rootScope.disableFileMenu = "disableFileMenu";
73 73
74 $rootScope.userInfo = { 74 $rootScope.userInfo = {
@@ -82,7 +82,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -82,7 +82,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
82 }; 82 };
83 $rootScope.userData; 83 $rootScope.userData;
84 $rootScope.userModules; 84 $rootScope.userModules;
85 - $rootScope.errorMesaage; 85 + $rootScope.passwordMismatchMessage;
86 $rootScope.isVisibleLogin; 86 $rootScope.isVisibleLogin;
87 $rootScope.haveRoleAdmin; 87 $rootScope.haveRoleAdmin;
88 var isfilloptionChecked = ""; 88 var isfilloptionChecked = "";
@@ -100,7 +100,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -100,7 +100,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
100 if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { 100 if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) {
101 101
102 // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING); 102 // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING);
103 - $rootScope.errorMassage = LoginMessageConstants.USER_CREDENTIALS_MISSING; 103 + $rootScope.errorMessage = LoginMessageConstants.USER_CREDENTIALS_MISSING;
104 $("#messageModal").modal('show'); 104 $("#messageModal").modal('show');
105 } 105 }
106 else { 106 else {
@@ -117,14 +117,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -117,14 +117,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
117 if (result == LoginConstants.USER_NOT_FOUND) { 117 if (result == LoginConstants.USER_NOT_FOUND) {
118 $rootScope.isVisibleLogin = true; 118 $rootScope.isVisibleLogin = true;
119 // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); 119 // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
120 - $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; 120 + $rootScope.errorMessage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT;
121 $("#messageModal").modal('show'); 121 $("#messageModal").modal('show');
122 122
123 } 123 }
124 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { 124 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
125 //alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); 125 //alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
126 $rootScope.isVisibleLogin = true; 126 $rootScope.isVisibleLogin = true;
127 - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; 127 + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
128 $("#messageModal").modal('show'); 128 $("#messageModal").modal('show');
129 } 129 }
130 else { 130 else {
@@ -151,7 +151,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -151,7 +151,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
151 console.log(' Error in authentication = ' + error.statusText); 151 console.log(' Error in authentication = ' + error.statusText);
152 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); 152 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
153 $rootScope.isVisibleLogin = true; 153 $rootScope.isVisibleLogin = true;
154 - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; 154 + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
155 $("#messageModal").modal('show'); 155 $("#messageModal").modal('show');
156 }); 156 });
157 } 157 }
@@ -210,17 +210,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -210,17 +210,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
210 .then(function (result) { 210 .then(function (result) {
211 if (result == LoginConstants.USER_NOT_FOUND) { 211 if (result == LoginConstants.USER_NOT_FOUND) {
212 // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); 212 // alert(LoginMessageConstants.INCORRECT_EMAIL_ID);
213 - $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID; 213 + $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID;
214 $("#messageModal").modal('show'); 214 $("#messageModal").modal('show');
215 } 215 }
216 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { 216 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
217 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); 217 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
218 - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; 218 + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
219 $("#messageModal").modal('show'); 219 $("#messageModal").modal('show');
220 } 220 }
221 else if (result == LoginConstants.MAIL_NOT_SENT) { 221 else if (result == LoginConstants.MAIL_NOT_SENT) {
222 // alert(LoginMessageConstants.MAIL_NOT_SENT); 222 // alert(LoginMessageConstants.MAIL_NOT_SENT);
223 - $rootScope.errorMassage = LoginMessageConstants.MAIL_NOT_SENT; 223 + $rootScope.errorMessage = LoginMessageConstants.MAIL_NOT_SENT;
224 $("#messageModal").modal('show'); 224 $("#messageModal").modal('show');
225 } 225 }
226 else { 226 else {
@@ -239,7 +239,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -239,7 +239,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
239 else 239 else
240 message = LoginMessageConstants.USERID_SENT_IN_EMAIL 240 message = LoginMessageConstants.USERID_SENT_IN_EMAIL
241 //alert(message); 241 //alert(message);
242 - $rootScope.errorMassage = message; 242 + $rootScope.errorMessage = message;
243 $("#messageModal").modal('show'); 243 $("#messageModal").modal('show');
244 244
245 245
@@ -250,19 +250,19 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -250,19 +250,19 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
250 function (error) { 250 function (error) {
251 console.log(' Error in authentication = ' + error.statusText); 251 console.log(' Error in authentication = ' + error.statusText);
252 // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); 252 // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS);
253 - $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS; 253 + $rootScope.errorMessage = LoginConstants.ERROR_IN_FECTHING_DETAILS;
254 $("#messageModal").modal('show'); 254 $("#messageModal").modal('show');
255 }); 255 });
256 } 256 }
257 else { 257 else {
258 // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); 258 // alert(LoginMessageConstants.INCORRECT_EMAIL_ID);
259 - $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID; 259 + $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID;
260 $("#messageModal").modal('show'); 260 $("#messageModal").modal('show');
261 } 261 }
262 } 262 }
263 else { 263 else {
264 //alert(LoginMessageConstants.BLANK_EMAIL_ID); 264 //alert(LoginMessageConstants.BLANK_EMAIL_ID);
265 - $rootScope.errorMassage = LoginMessageConstants.BLANK_EMAIL_ID; 265 + $rootScope.errorMessage = LoginMessageConstants.BLANK_EMAIL_ID;
266 $("#messageModal").modal('show'); 266 $("#messageModal").modal('show');
267 267
268 } 268 }
@@ -289,28 +289,30 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -289,28 +289,30 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
289 userInfo.emailId = split[1]; 289 userInfo.emailId = split[1];
290 } 290 }
291 291
292 - if (userInfo.newPassword === userInfo.confirmPassword) {  
293 - $rootScope.errorMesaage = null; 292 + if (userInfo.newPassword != null) {
  293 +
  294 + if (userInfo.newPassword === userInfo.confirmPassword) {
  295 + $rootScope.passwordMismatchMessage = null;
294 296
295 AuthenticationService.ResetUserPassword(userInfo) 297 AuthenticationService.ResetUserPassword(userInfo)
296 .then( 298 .then(
297 function (result) { 299 function (result) {
298 if (result == LoginConstants.USER_NOT_FOUND) { 300 if (result == LoginConstants.USER_NOT_FOUND) {
299 // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); 301 // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
300 - $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; 302 + $rootScope.errorMessage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT;
301 $("#messageModal").modal('show'); 303 $("#messageModal").modal('show');
302 304
303 } 305 }
304 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { 306 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
305 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); 307 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
306 - $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS; 308 + $rootScope.errorMessage = LoginConstants.ERROR_IN_FECTHING_DETAILS;
307 $("#messageModal").modal('show'); 309 $("#messageModal").modal('show');
308 310
309 } 311 }
310 else { 312 else {
311 if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) { 313 if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) {
312 // alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE); 314 // alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE);
313 - $rootScope.errorMassage = LoginMessageConstants.PASSWORD_RESET_MESSAGE; 315 + $rootScope.errorMessage = LoginMessageConstants.PASSWORD_RESET_MESSAGE;
314 $("#messageModal").modal('show'); 316 $("#messageModal").modal('show');
315 $rootScope.isVisibleLogin = true; 317 $rootScope.isVisibleLogin = true;
316 $rootScope.isVisibleResetPass = false; 318 $rootScope.isVisibleResetPass = false;
@@ -321,13 +323,18 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -321,13 +323,18 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
321 function (error) { 323 function (error) {
322 console.log(' Error in authentication = ' + error.statusText); 324 console.log(' Error in authentication = ' + error.statusText);
323 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); 325 // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
324 - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; 326 + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
325 $("#messageModal").modal('show'); 327 $("#messageModal").modal('show');
326 328
327 }); 329 });
328 } 330 }
329 else { 331 else {
330 - $rootScope.errorMesaage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH; 332 + $rootScope.passwordMismatchMassage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH;
  333 + //$("#messageModal").modal('show');
  334 + }
  335 + }
  336 + else {
  337 + $rootScope.errorMessage = LoginMessageConstants.NEW_PASSWORD_FIELD_IS_EMPTY;
331 $("#messageModal").modal('show'); 338 $("#messageModal").modal('show');
332 } 339 }
333 } 340 }
@@ -3598,7 +3605,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -3598,7 +3605,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3598 AdminService.SendAdminAccessRequestMail(userInfo) 3605 AdminService.SendAdminAccessRequestMail(userInfo)
3599 .then(function (result) { 3606 .then(function (result) {
3600 if (result == AdminConstants.MAIL_SENT) { 3607 if (result == AdminConstants.MAIL_SENT) {
3601 - $rootScope.errorMassage = AdminConstants.MAIL_SENT_SUCCESS_MESSAGE; 3608 + $rootScope.errorMessage = AdminConstants.MAIL_SENT_SUCCESS_MESSAGE;
3602 $("#messageModal").modal('show'); 3609 $("#messageModal").modal('show');
3603 } 3610 }
3604 $("#adminModal").fadeOut(); 3611 $("#adminModal").fadeOut();
@@ -3607,7 +3614,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -3607,7 +3614,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3607 }, 3614 },
3608 function (error) { 3615 function (error) {
3609 console.log(' Error in sending mail to admin support = ' + error.statusText); 3616 console.log(' Error in sending mail to admin support = ' + error.statusText);
3610 - $rootScope.errorMassage = AdminConstants.ERROR_IN_SENDING_MAIL; 3617 + $rootScope.errorMessage = AdminConstants.ERROR_IN_SENDING_MAIL;
3611 $("#messageModal").modal('show'); 3618 $("#messageModal").modal('show');
3612 }); 3619 });
3613 }; 3620 };
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -306,6 +306,7 @@ AIA.constant("LoginMessageConstants", { @@ -306,6 +306,7 @@ AIA.constant("LoginMessageConstants", {
306 "NEW_AND_OLD_PASSWORD_DONOT_MATCH": "Your new password and confirm password not matched!", 306 "NEW_AND_OLD_PASSWORD_DONOT_MATCH": "Your new password and confirm password not matched!",
307 "USER_CREDENTIALS_MISSING": "Please Enter your credentials.", 307 "USER_CREDENTIALS_MISSING": "Please Enter your credentials.",
308 "USER_NOT_FOUND": "User not found.", 308 "USER_NOT_FOUND": "User not found.",
  309 + "NEW_PASSWORD_FIELD_IS_EMPTY": "Please enter new password to reset your password."
309 //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", 310 //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
310 //"MAIL_NOT_SENT": "Mail not sent." 311 //"MAIL_NOT_SENT": "Mail not sent."
311 312
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1127,7 +1127,7 @@ @@ -1127,7 +1127,7 @@
1127 <td> 1127 <td>
1128 <input class="form-control" name="confirmPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.confirmPassword" required> 1128 <input class="form-control" name="confirmPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.confirmPassword" required>
1129 <span style="color: maroon; font-weight: bold; " ng-show="resetPasswordForm.confirmPassword.$touched && resetPasswordForm.confirmPassword.$invalid">Confirm password is required.</span> 1129 <span style="color: maroon; font-weight: bold; " ng-show="resetPasswordForm.confirmPassword.$touched && resetPasswordForm.confirmPassword.$invalid">Confirm password is required.</span>
1130 - <span style="color: maroon; font-weight: bold; " ng-if="errorMesaage">{{errorMesaage}}</span> 1130 + <span style="color: maroon; font-weight: bold; " ng-if="passwordMismatchMessage">{{passwordMismatchMessage}}</span>
1131 </td> 1131 </td>
1132 </tr> 1132 </tr>
1133 <tr> 1133 <tr>
@@ -1157,7 +1157,7 @@ @@ -1157,7 +1157,7 @@
1157 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> 1157 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
1158 </div> 1158 </div>
1159 <div class="modal-title"></div> 1159 <div class="modal-title"></div>
1160 - <div class="modal-body">{{errorMassage}}</div> 1160 + <div class="modal-body">{{errorMessage}}</div>
1161 <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></div> 1161 <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></div>
1162 </div> 1162 </div>
1163 </div> 1163 </div>