71 lines
4.1 KiB
HTML
71 lines
4.1 KiB
HTML
<div>
|
|
<div class="alert alert-success text-center" ng-hide="!vm.passwordValues.generatedPassword">
|
|
<small>Password has been reset to:</small>
|
|
<br />
|
|
<strong>{{vm.passwordValues.generatedPassword}}</strong>
|
|
</div>
|
|
<div ng-switch="vm.changing">
|
|
<div ng-switch-when="false">
|
|
<button type="button" ng-click="vm.doChange()" class="btn umb-button__button btn-action">
|
|
<localize key="general_changePassword">Change password</localize>
|
|
</button>
|
|
</div>
|
|
<div ng-switch-when="true">
|
|
|
|
<ng-form name="changePasswordForm">
|
|
<umb-control-group alias="resetPassword" label="@user_resetPassword" ng-show="vm.config.enableReset">
|
|
<umb-checkbox model="vm.passwordValues.reset" server-validation-field="resetPassword"
|
|
on-change="vm.showReset = !vm.showReset" />
|
|
<span ng-messages="changePasswordForm.resetPassword.$error" show-validation-on-submit>
|
|
<span class="help-inline" ng-message="valServerField">{{changePasswordForm.resetPassword.errorMsg}}</span>
|
|
</span>
|
|
|
|
</umb-control-group>
|
|
|
|
<!-- we need to show the old pass field when the provider cannot retrieve the password -->
|
|
<umb-control-group alias="oldPassword" label="@user_oldPassword" ng-if="vm.showOldPass()" required="true">
|
|
<input type="password" name="oldPassword" ng-model="vm.passwordValues.oldPassword"
|
|
class="input-block-level umb-textstring textstring"
|
|
required
|
|
val-server-field="oldPassword"
|
|
no-dirty-check />
|
|
<span ng-messages="changePasswordForm.oldPassword.$error" show-validation-on-submit>
|
|
<span class="help-inline" ng-message="required">Required</span>
|
|
<span class="help-inline" ng-message="valServerField">{{changePasswordForm.oldPassword.errorMsg}}</span>
|
|
</span>
|
|
</umb-control-group>
|
|
|
|
<umb-control-group alias="password" label="@user_newPassword" ng-if="!vm.showReset" required="true">
|
|
<input type="password" name="password" ng-model="vm.passwordValues.newPassword"
|
|
class="input-block-level umb-textstring textstring"
|
|
required
|
|
val-server-field="password"
|
|
ng-minlength="{{vm.config.minPasswordLength}}"
|
|
no-dirty-check />
|
|
<span ng-messages="changePasswordForm.password.$error" show-validation-on-submit>
|
|
<span class="help-inline" ng-message="required">Required</span>
|
|
<span class="help-inline" ng-message="minlength">Minimum {{vm.config.minPasswordLength}} characters</span>
|
|
<span class="help-inline" ng-message="valServerField">{{changePasswordForm.password.errorMsg}}</span>
|
|
</span>
|
|
</umb-control-group>
|
|
|
|
<umb-control-group alias="confirmPassword" label="@user_confirmNewPassword" ng-if="!vm.showReset" required="true">
|
|
<input type="password" name="confirmPassword" ng-model="vm.passwordValues.confirm"
|
|
class="input-block-level umb-textstring textstring"
|
|
val-compare="password"
|
|
no-dirty-check />
|
|
<span ng-messages="changePasswordForm.confirmPassword.$error" show-validation-on-submit>
|
|
<span class="help-inline" ng-message="valCompare"><localize key="user_passwordMismatch">The confirmed password doesn't match the new password!</localize></span>
|
|
</span>
|
|
</umb-control-group>
|
|
|
|
<button ng-click="vm.cancelChange()" ng-show="vm.showCancelBtn()" class="btn umb-button__button btn-cancel umb-button--">
|
|
<localize key="general_cancel">Cancel</localize>
|
|
</button>
|
|
|
|
</ng-form>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|