Commit 72beab83a47f026a7d8b7df6efd31fef1861c9b5
1 parent
e9bb8720
Committing updated files
Showing
2 changed files
with
30 additions
and
9 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -85,6 +85,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
85 | 85 | $rootScope.passwordMismatchMessage; |
86 | 86 | $rootScope.isVisibleLogin; |
87 | 87 | $rootScope.haveRoleAdmin; |
88 | + $rootScope.checked = false; | |
88 | 89 | var isfilloptionChecked = ""; |
89 | 90 | var isOutlineOptionChecked = ""; |
90 | 91 | $rootScope.forgotPwdModalShow = function () |
... | ... | @@ -163,19 +164,38 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
163 | 164 | |
164 | 165 | else if ((!result.IsSubscriptionExpired) && (result.License != null) && (result.License.IsActive) && result.IsActive) { |
165 | 166 | if (result.UserType == UserTypeConstants.CLIENT_ADMIN || result.UserType == UserTypeConstants.DISTRICT_ADMIN || result.UserType == UserTypeConstants.SINGLE_USER || result.UserType == UserTypeConstants.RESELLER) { |
166 | - if (result.License.IsTermAccepted) { | |
167 | + //if (result.License.IsTermAccepted) { | |
167 | 168 | $rootScope.userData = result; |
168 | 169 | $rootScope.userModules = result.Modules; |
169 | 170 | $rootScope.isVisibleLogin = false; |
170 | 171 | $rootScope.haveRoleAdmin = true; |
171 | 172 | localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); |
172 | 173 | $('#dvUserModulesInfo').modal('show'); |
173 | - } | |
174 | - else { | |
175 | - $rootScope.isVisibleLogin = true; | |
176 | - $('#dvTermCondition').modal('show'); | |
177 | - UpdateUserTermAndCondition(result.License.AccountNumber) | |
178 | - } | |
174 | + //} | |
175 | + //else { | |
176 | + // $rootScope.isVisibleLogin = true; | |
177 | + // $('#dvTermCondition').modal('show'); | |
178 | + | |
179 | + //if ($rootScope.checked) { | |
180 | + // UpdateUserTermAndCondition(result.License.AccountNumber); | |
181 | + //$rootScope.userData = result; | |
182 | + //$rootScope.userModules = result.Modules; | |
183 | + //$rootScope.isVisibleLogin = false; | |
184 | + //$rootScope.haveRoleAdmin = true; | |
185 | + //localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
186 | + //$('#dvUserModulesInfo').modal('show'); | |
187 | + //} | |
188 | + //else { | |
189 | + // //$rootScope.isVisibleLogin = true; | |
190 | + // $('#dvTermCondition').modal('show'); | |
191 | + //} | |
192 | + | |
193 | + | |
194 | + //} | |
195 | + | |
196 | + if (!result.License.IsTermAccepted) { | |
197 | + $('#dvTermCondition').modal('show'); | |
198 | + } | |
179 | 199 | } |
180 | 200 | else { |
181 | 201 | $rootScope.userData = result; |
... | ... | @@ -235,6 +255,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
235 | 255 | |
236 | 256 | } |
237 | 257 | function UpdateUserTermAndCondition(accountNumber) { |
258 | + | |
238 | 259 | AuthenticationService.UpdateTermAndConditionAcceptanceStatus(accountNumber) |
239 | 260 | .then(function (result) { |
240 | 261 | console.log(' Term and Condition acceptance status updated successfully.'); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -1311,8 +1311,8 @@ |
1311 | 1311 | <!-- form --> |
1312 | 1312 | <form class="form-horizontal"> |
1313 | 1313 | <div class="form-group"> |
1314 | - <input type="checkbox" id="chkAccept" />I accept | |
1315 | - <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" data-dismiss="modal"><i class="fa fa-check"></i> Next</button> | |
1314 | + <input type="checkbox" id="chkAccept" ng-model="checked" />I accept | |
1315 | + <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" ng-disabled="!checked" data-dismiss="modal"><i class="fa fa-check"></i> Next</button> | |
1316 | 1316 | </div> |
1317 | 1317 | </form> |
1318 | 1318 | </div> | ... | ... |