Clean up of change password section in member details (#6643)

* Clean up of change password section in member details

* Added missing attributes to umb-checkbox

* More tweaks based on comments

* Removed href from the button
This commit is contained in:
Sebastiaan Janssen
2019-10-29 19:42:13 +01:00
committed by GitHub

View File

@@ -6,24 +6,21 @@
</div>
<div ng-switch="vm.changing">
<div ng-switch-when="false">
<a href="" ng-click="vm.doChange()" class="btn btn-small">
<button type="button" ng-click="vm.doChange()" class="btn umb-button__button btn-action">
<localize key="general_changePassword">Change password</localize>
</a>
</button>
</div>
<div ng-switch-when="true">
<ng-form name="changePasswordForm">
<umb-control-group alias="resetPassword" label="@user_resetPassword" ng-show="vm.config.enableReset">
<input type="checkbox" ng-model="vm.passwordValues.reset"
name="resetPassword"
val-server-field="resetPassword"
no-dirty-check
ng-change="vm.showReset = !vm.showReset" />
<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>
</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">
@@ -62,9 +59,9 @@
</span>
</umb-control-group>
<a href="" ng-click="vm.cancelChange()" ng-show="vm.showCancelBtn()" class="btn btn-small">
<button ng-click="vm.cancelChange()" ng-show="vm.showCancelBtn()" class="btn umb-button__button btn-cancel umb-button--">
<localize key="general_cancel">Cancel</localize>
</a>
</button>
</ng-form>
</div>