Skip to content

Commit

Permalink
v8: Highlight of old password in change password form (#6274)
Browse files Browse the repository at this point in the history
(cherry picked from commit f4f99d7)
  • Loading branch information
bjarnef authored and nul800sebastiaan committed Sep 5, 2019
1 parent 9de47d1 commit 468cd96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
Expand Up @@ -26,8 +26,7 @@ <h5><localize key="user_yourProfile" /></h5>
action="togglePasswordFields()"
button-style="action"
label="Change password"
label-key="general_changePassword"
button-style="success">
label-key="general_changePassword">
</umb-button>

<umb-button
Expand All @@ -50,8 +49,7 @@ <h5>

<div ng-repeat="login in externalLoginProviders">

<form ng-if="login.linkedProviderKey == undefined" method="POST" name="externalLoginForm"
action="{{externalLinkLoginFormAction}}" id="oauthloginform" name="oauthloginform">
<form ng-if="login.linkedProviderKey == undefined" method="POST" action="{{externalLinkLoginFormAction}}" id="oauthloginform" name="oauthloginform">
<input type="hidden" name="provider" value="{{login.authType}}" />
<button class="btn btn-block btn-social"
ng-class="login.properties.SocialStyle"
Expand Down
Expand Up @@ -12,16 +12,15 @@
</div>
<div ng-switch-when="true">

<ng-form name="vm.passwordForm">
<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"
id="Checkbox1"
name="resetPassword"
val-server-field="resetPassword"
no-dirty-check
ng-change="vm.showReset = !vm.showReset" />
<span ng-messages="vm.passwordForm.resetPassword.$error" show-validation-on-submit>
<span class="help-inline" ng-message="valServerField">{{vm.passwordForm.resetPassword.errorMsg}}</span>
<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>
Expand All @@ -33,9 +32,9 @@
required
val-server-field="oldPassword"
no-dirty-check />
<span ng-messages="vm.passwordForm.oldPassword.$error" show-validation-on-submit>
<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">{{vm.passwordForm.oldPassword.errorMsg}}</span>
<span class="help-inline" ng-message="valServerField">{{changePasswordForm.oldPassword.errorMsg}}</span>
</span>
</umb-control-group>

Expand All @@ -46,19 +45,19 @@
val-server-field="password"
ng-minlength="{{vm.config.minPasswordLength}}"
no-dirty-check />
<span ng-messages="vm.passwordForm.password.$error" show-validation-on-submit>
<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">{{vm.passwordForm.password.errorMsg}}</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"
<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="vm.passwordForm.confirmpassword.$error" show-validation-on-submit>
<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>
Expand Down

0 comments on commit 468cd96

Please sign in to comment.