diff --git a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html index 9387c84dc2..37ac7f0175 100644 --- a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html +++ b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html @@ -1,5 +1,5 @@
-
+
{ if (PASSWORD_FIELDS.indexOf(String(control.name)) < 0) return errors; @@ -38,7 +38,7 @@ export class ChangePasswordComponent ) {} ngOnInit(): void { - this.hideOldPassword = !this.store.selectSnapshot(ProfileState.getProfile).hasPassword; + this.hideCurrentPassword = !this.store.selectSnapshot(ProfileState.getProfile).hasPassword; const passwordValidations = getPasswordValidators(this.store); @@ -63,7 +63,7 @@ export class ChangePasswordComponent }, ); - if (this.hideOldPassword) this.form.removeControl('password'); + if (this.hideCurrentPassword) this.form.removeControl('password'); } onSubmit() { @@ -72,7 +72,7 @@ export class ChangePasswordComponent this.store .dispatch( new ChangePassword({ - ...(!this.hideOldPassword && { currentPassword: this.form.get('password').value }), + ...(!this.hideCurrentPassword && { currentPassword: this.form.get('password').value }), newPassword: this.form.get('newPassword').value, }), )