Update change-password.htm

Add "(form.$submitted || form.$$$$)" on show ng-message to resolve no focus on form can't show error message issue.
This commit is contained in:
yhua123 2016-07-07 11:04:46 +08:00 committed by GitHub
parent b612b42c24
commit 9ebce75c07

View File

@ -11,7 +11,7 @@
<label for="oldPassword" class="col-sm-3 control-label">// 'old_password' | tr //:</label>
<div class="col-sm-7">
<input type="password" class="form-control" id="oldPassword" ng-model="user.oldPassword" ng-change="vm.reset()" name="uOldPassword" required>
<div class="error-message" ng-messages="form.uOldPassword.$touched && form.uOldPassword.$error">
<div class="error-message" ng-messages="(form.$submitted || form.uOldPassword.$touched) && form.uOldPassword.$error">
<span ng-message="required">// 'old_password_is_required' | tr //</span>
</div>
</div>
@ -23,7 +23,7 @@
<label for="password" class="col-sm-3 control-label">// 'new_password' | tr //:</label>
<div class="col-sm-7">
<input type="password" class="form-control" id="password" ng-model="user.password" ng-change="vm.reset()" name="uPassword" required password>
<div class="error-message" ng-messages="form.uPassword.$touched && form.uPassword.$error">
<div class="error-message" ng-messages="(form.$submitted || form.uPassword.$touched) && form.uPassword.$error">
<span ng-message="required">// 'password_is_required' | tr //</span>
<span ng-message="password">// 'password_is_invalid' | tr //</span>
</div>
@ -37,7 +37,7 @@
<label for="confirmPassword" class="col-sm-3 control-label">// 'confirm_password' | tr //:</label>
<div class="col-sm-7">
<input type="password" class="form-control" id="confirmPassword" ng-model="user.confirmPassword" ng-change="vm.reset()" name="uConfirmPassword" ng-model-options="{ updateOn: 'blur' }" compare-to="user.password">
<div class="error-message" ng-messages="form.uConfirmPassword.$touched && form.uConfirmPassword.$error">
<div class="error-message" ng-messages="(form.$submitted || form.uConfirmPassword.$touched) && form.uConfirmPassword.$error">
<span ng-message="compareTo">// 'password_does_not_match' | tr //</span>
</div>
</div>
@ -60,4 +60,4 @@
</div>
</div>
</div>
</div>
</div>