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