Commit 12592eb0ef7715618270bcfc3e16ba0483446493

Authored by Utkarsh Singh
1 parent 7de53748

Committed

400-SOURCECODE/AIAHTML5.API/bin/AIAHTML5.API.dll.config
... ... @@ -37,8 +37,8 @@
37 37 <add key="SMTPAddress" value="smtp.emailsrvr.com" />
38 38 <add key="SMTPPort" value="587" />
39 39 <add key="EnableSSL" value="false" />
40   - <add key="NotifyEmailAddress" value="support@interactiveanatomy.com" /> <!--support@interactiveanatomy.com-->
41   - <add key ="Site_Url" value="//192.168.86.34:82"/>
  40 + <add key="NotifyEmailAddress" value="support@interactiveanatomy.com" />
  41 + <add key="Site_Url" value ="//52.2.38.120"/>
42 42 </appSettings>
43 43 <system.web>
44 44 <compilation debug="true" targetFramework="4.5" />
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -161,25 +161,39 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
161 161 }
162 162 }
163 163  
164   - $rootScope.SendMailToUser = function (userInfo, isPasswordMissing) {
  164 + $rootScope.SendMailToUser = function (userInfo, isMailForPassword) {
165 165 if ((userInfo.emailId != null) && (userInfo.emailId != '')) {
166 166 if (validateEmail(userInfo.emailId)) {
167   - if (isPasswordMissing == 'true')
  167 + if (isMailForPassword == 'true')
168 168 userInfo.isPassword = true;
169 169 else
170 170 userInfo.isPassword = false;
171 171  
172 172 AuthenticationService.SendMailToUser(userInfo)
173 173 .then(function (result) {
174   - if($('.forgot-sm').length>0) {
175   - $('.forgot-sm').fadeOut();
176   - $('.forgot-sm').modal('hide');
177   - alert('UserID sent in mail successfully.');
  174 + if (result == LoginConstants.USER_NOT_FOUND) {
  175 + alert("Error occured.");
178 176 }
179   - if($('.forgot-sm1').length>0) {
180   - $('.forgot-sm1').fadeOut();
181   - $('.forgot-sm1').modal('hide');
182   - alert('Password sent in mail successfully.');
  177 + else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
  178 + alert("Error occured.");
  179 + }
  180 + else {
  181 + if (result.loginId != undefined || result.loginId != "" || result.loginId != null) {
  182 + var message;
  183 + if ($('.forgot-sm').length > 0) {
  184 + $('.forgot-sm').fadeOut();
  185 + $('.forgot-sm').modal('hide');
  186 + }
  187 + if ($('.forgot-sm1').length > 0) {
  188 + $('.forgot-sm1').fadeOut();
  189 + $('.forgot-sm1').modal('hide');
  190 + }
  191 + if (isMailForPassword)
  192 + message = "Password";
  193 + else
  194 + message = "UserId";
  195 + alert(message + " sent in mail successfully.");
  196 + }
183 197 }
184 198  
185 199 },
... ... @@ -189,40 +203,23 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
189 203 });
190 204 }
191 205 else {
192   - alert("Please, enter correct email id");
  206 + alert("Please enter correct email id");
193 207 }
194 208 }
195 209 else {
196   - alert("Please, enter your email id");
  210 + alert("Please enter your email id");
197 211 }
198   - };
  212 + };
199 213  
200   - // $rootScope.SendMailToUser = function (userInfo, missingPass) {
201   - // if ((userInfo.emailId != null) && (userInfo.emailId != '')) {
202   - // if (validateEmail(userInfo.emailId)) {
203   - // if (missingPass == 'true')
204   - // userInfo.isPassword = true;
205   - // else
206   - // userInfo.isPassword = false;
207   -
208   - // AuthenticationService.SendMailToUser(userInfo);
209   - // }
210   - // else {
211   - // alert("Please, enter correct email id");
212   - // }
213   - // }
214   - // else {
215   - // alert("Please, enter your email id");
216   - // }
217   - //};
  214 + $rootScope.closeResetPasswordPopup = function () {
  215 + $("#passwordReset").fadeOut();
  216 + $("#passwordReset").modal('hide');
  217 + }
218 218  
219 219 function validateEmail(email) {
220 220 var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
221 221 return re.test(email);
222 222 }
223   - //$(document).ready(function () {
224   - // getUserDetails();
225   - //});
226 223  
227 224 $rootScope.ResetUserPassword = function (userInfo) {
228 225 var url = $location.url();
... ... @@ -244,7 +241,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
244 241 }
245 242 else {
246 243 if (result.loginId != undefined || result.loginId != "" || result.loginId != null) {
247   - alert('Password has been reset.');
  244 + alert('Your password has been reset.');
248 245 $rootScope.isVisibleLogin = true;
249 246 $rootScope.isVisibleResetPass = false;
250 247 $location.url() = "/";
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... ... @@ -27,14 +27,6 @@
27 27 }
28 28 })
29 29 .success(function (data, status, headers, config) {
30   - //if (data == "User not found.")
31   - // alert("User does not exists.");
32   - //else {
33   - // if (!userInfo.ispassword) {
34   - // alert("UserID sent in mail successfully.");
35   - // $('.forgot-sm').fadeOut();
36   - // }
37   - //}
38 30 console.log('success');
39 31 deferred.resolve(data);
40 32 }).error(function (data, status, headers, config) {
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -1092,9 +1092,8 @@
1092 1092 </tr>
1093 1093 <tr>
1094 1094 <td align="center" valign="top" bgcolor="#808d43" style="padding:20px; overflow:hidden;">
1095   - <form name="resetPwdForm" novalidate>
1096   - <!--ng-submit="submitForm(resetPwdForm.$valid) && comparePasswords(userInfo)" >-->
1097   - <table width="100%" border="0" cellspacing="0" cellpadding="0" id='resetPwdform' ng-controller="HomeController">
  1095 + <form name="resetPasswordForm" novalidate>
  1096 + <table width="100%" border="0" cellspacing="0" cellpadding="0" ng-controller="HomeController">
1098 1097 <tbody>
1099 1098  
1100 1099 <tr>
... ... @@ -1109,8 +1108,8 @@
1109 1108 <tr>
1110 1109 <td>
1111 1110 <input class="form-control" name="newPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.newPassword" ng-minlength="5" required>
1112   - <span style="color: maroon; font-weight:bold" ng-show="resetPwdForm.newPassword.$touched && resetPwdForm.newPassword.$invalid && resetPwdForm.newPassword.$pristine">The password is required.</span>
1113   - <p ng-show="resetPwdForm.newPassword.$error.minlength" style="font-weight: bold; color: maroon;">Password is too short.</p>
  1111 + <span style="color: maroon; font-weight:bold" ng-show="resetPasswordForm.newPassword.$touched && resetPasswordForm.newPassword.$invalid && resetPasswordForm.newPassword.$pristine">The password is required.</span>
  1112 + <p ng-show="resetPasswordForm.newPassword.$error.minlength" style="font-weight: bold; color: maroon;">Password is too short.</p>
1114 1113 </td>
1115 1114 </tr>
1116 1115 <tr>
... ... @@ -1123,7 +1122,7 @@
1123 1122 <tr>
1124 1123 <td>
1125 1124 <input class="form-control" name="confirmPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.confirmPassword" required>
1126   - <span style="color: maroon; font-weight: bold; " ng-show="resetPwdForm.confirmPassword.$touched && resetPwdForm.confirmPassword.$invalid">Confirm password is required.</span>
  1125 + <span style="color: maroon; font-weight: bold; " ng-show="resetPasswordForm.confirmPassword.$touched && resetPasswordForm.confirmPassword.$invalid">Confirm password is required.</span>
1127 1126 <span style="color: maroon; font-weight: bold; " ng-if="errorMesaage">{{errorMesaage}}</span>
1128 1127 </td>
1129 1128 </tr>
... ... @@ -1132,8 +1131,8 @@
1132 1131 </tr>
1133 1132 <tr>
1134 1133 <td>
1135   - <button type="submit" ng-click="ResetUserPassword(userInfo)" ng-submit="submitForm(resetPwdForm.$valid)" style=" color:#423030; background:#ff9900; border:1px solid #ff9900; cursor:pointer; color:#fff; padding:5px 10px; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:gotham, 'Helvetica Neue' , helvetica, arial, sans-serif" id="btnUpdatePwd">Submit</button>
1136   - <button type="submit" id="close-resetPwdForm" ng-click="closeResetPwdPopup()" style="color:#423030; background:#231f20; border:1px solid #231f20; cursor:pointer; color:#fff; padding:5px 10px; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif" data-dismiss="modal">Close</button>
  1134 + <button type="submit" ng-click="ResetUserPassword(userInfo)" ng-submit="submitForm(resetPwdForm.$valid)" style=" color:#423030; background:#ff9900; border:1px solid #ff9900; cursor:pointer; color:#fff; padding:5px 10px; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:gotham, 'Helvetica Neue' , helvetica, arial, sans-serif" id="btnUpdatePassword">Submit</button>
  1135 + <button type="submit" id="close-resetPasswordForm" ng-click="closeResetPasswordPopup()" style="color:#423030; background:#231f20; border:1px solid #231f20; cursor:pointer; color:#fff; padding:5px 10px; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif" data-dismiss="modal">Close</button>
1137 1136 </td>
1138 1137 </tr>
1139 1138 </tbody>
... ...