update for sign-in validation interaction.

This commit is contained in:
kunw 2016-06-13 12:09:06 +08:00
parent fc25048fdb
commit 839e2ecbc1

View File

@ -6,12 +6,12 @@
<p class="control-button"><input type="button" class="btn btn-link pull-right" value="// 'log_out' | tr //" ng-click="vm.doLogOut()"></p>
</div>
{{ else }}
<form name="form" class="form-horizontal css-form" ng-submit="form.$valid" novalidate>
<form name="form" class="form-horizontal css-form" novalidate>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input id="username" type="text" class="form-control" placeholder="// 'username_email' | tr //" name="uPrincipal" ng-change="vm.reset()" ng-model="user.principal" ng-model-options="{ debounce: { default: 500, blur: 0 } }" required>
<div class="error-message">
<div ng-messages="form.uPrincipal.$error" ng-if="form.uPrincipal.$touched || form.$submitted">
<div ng-messages="form.$submitted && form.uPrincipal.$error">
<span ng-message="required">// 'username_is_required' | tr //</span>
</div>
</div>
@ -21,7 +21,7 @@
<div class="col-sm-offset-1 col-sm-10">
<input type="password" class="form-control" placeholder="// 'password' | tr //" name="uPassword" ng-change="vm.reset()" ng-model-options="{ debounce: { default: 500, blur: 0 } }" ng-model="user.password" required>
<div class="error-message">
<div ng-messages="form.uPassword.$error" ng-if="form.uPassword.$touched || form.$submitted">
<div ng-messages="form.$submitted && form.uPassword.$error">
<span ng-message="required">// 'password_is_required' | tr //</span>
</div>
<span ng-show="vm.hasError">// vm.errorMessage | tr //</span>