Add basic error handling

This commit is contained in:
Johannes Zellner
2016-07-26 14:09:11 +02:00
parent 99af676344
commit 7e3628f4c5
2 changed files with 18 additions and 4 deletions

View File

@@ -108,7 +108,7 @@
<div class="form-group" ng-class="{ 'has-error': (!appstoreLoginForm.password.$dirty && appstoreLogin.error.password) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid) }">
<label class="control-label">Password</label>
<input type="password" class="form-control" ng-model="appstoreLogin.password" id="inputPlanChangePassword" name="password" required autofocus>
<input type="password" class="form-control" ng-model="appstoreLogin.password" id="inputAppstoreLoginPassword" name="password" required autofocus>
<div class="control-label" ng-show="(!appstoreLoginForm.password.$dirty && appstoreLogin.error.password) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid)">
<small ng-show=" appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid">A password is required</small>
<small ng-show="!appstoreLoginForm.password.$dirty && appstoreLogin.error.password">Wrong password</small>
@@ -120,7 +120,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="appstoreLogin.submit()" ng-disabled="appstoreLoginForm.$invalid || appstoreLogin.busy"><i class="fa fa-spinner fa-pulse" ng-show="appstoreLogin.busy"></i> Change</button>
<button type="button" class="btn btn-success" ng-click="appstoreLogin.submit()" ng-disabled="appstoreLoginForm.$invalid || appstoreLogin.busy"><i class="fa fa-spinner fa-pulse" ng-show="appstoreLogin.busy"></i> Login</button>
</div>
</div>
</div>