Files
meanTorrent/modules/users/client/views/settings/change-password.client.view.html
2017-05-04 12:12:37 +08:00

41 lines
2.9 KiB
HTML

<section class="row">
<div class="col-xs-offset-1 col-xs-10 col-md-offset-4 col-md-4">
<form name="vm.passwordForm" ng-submit="vm.changeUserPassword(vm.passwordForm.$valid)" class="signin" novalidate autocomplete="off">
<fieldset>
<div class="form-group" show-errors>
<label for="currentPassword">{{'CAPTION_CURRENT_PASSWORD' | translate}}</label>
<input type="password" id="currentPassword" name="currentPassword" class="form-control" ng-model="vm.passwordDetails.currentPassword" placeholder="Current Password" required autofocus>
<div ng-messages="vm.passwordForm.currentPassword.$error" role="alert">
<p class="help-block error-text" ng-message="required">{{'CAPTION_REQUIRED_CURRENT_PASSWORD' | translate}}</p>
</div>
</div>
<div class="form-group" show-errors>
<label for="newPassword">{{'CAPTION_NEW_PASSWORD' | translate}}</label>
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="vm.passwordDetails.newPassword" placeholder="New Password" uib-popover="{{vm.getPopoverMsg()}}" uib-popover-trigger="focus" password-validator required>
<div ng-messages="vm.passwordForm.newPassword.$error" role="alert">
<p class="help-block error-text" ng-message="required">{{'CAPTION_REQUIRED_NEW_PASSWORD' | translate}}</p>
<div ng-repeat="passwordError in passwordErrors">
<p class="help-block error-text" ng-show="vm.passwordForm.newPassword.$error.requirements">{{passwordError}}</p>
</div>
</div>
</div>
<div class="form-group" show-errors>
<label for="verifyPassword">{{'CAPTION_VERIFY_PASSWORD' | translate}}</label>
<input type="password" id="verifyPassword" name="verifyPassword" class="form-control" ng-model="vm.passwordDetails.verifyPassword" placeholder="Verify Password" password-verify="vm.passwordDetails.newPassword" required>
<div ng-messages="vm.passwordForm.verifyPassword.$error" role="alert">
<p class="help-block error-text" ng-message="required">{{'CAPTION_REQUIRED_VERIFY_PASSWORD' | translate}}</p>
<p class="help-block error-text" ng-show="vm.passwordForm.verifyPassword.$error.passwordVerify">{{'CAPTION_PASSWORD_NOT_MATCH' | translate}}</p>
</div>
</div>
<div class="form-group" ng-show="!vm.passwordForm.newPassword.$error.required">
<label>Password Requirements</label>
<uib-progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></uib-progressbar>
</div>
<div class="text-center form-group">
<button type="submit" class="btn btn-primary">{{'BUTTON_SAVE_PASSWORD' | translate}}</button>
</div>
</fieldset>
</form>
</div>
</section>