[PM-12724] - fix logic for showing new password (#11512)
* fix logic for showing new password * fix logic
This commit is contained in:
parent
e8f7cdfeed
commit
1459c06d17
|
@ -12,8 +12,8 @@
|
|||
>
|
||||
</bit-form-field>
|
||||
<bit-form-field>
|
||||
<bit-label *ngIf="!originalSendView || !hasPassword">{{ "password" | i18n }}</bit-label>
|
||||
<bit-label *ngIf="originalSendView && hasPassword">{{ "newPassword" | i18n }}</bit-label>
|
||||
<bit-label *ngIf="!shouldShowNewPassword">{{ "password" | i18n }}</bit-label>
|
||||
<bit-label *ngIf="shouldShowNewPassword">{{ "newPassword" | i18n }}</bit-label>
|
||||
<input bitInput type="password" formControlName="password" />
|
||||
<button
|
||||
data-testid="toggle-visibility-for-password"
|
||||
|
|
|
@ -53,10 +53,8 @@ export class SendOptionsComponent implements OnInit {
|
|||
hideEmail: [false as boolean],
|
||||
});
|
||||
|
||||
get hasPassword(): boolean {
|
||||
return (
|
||||
this.sendOptionsForm.value.password !== null && this.sendOptionsForm.value.password !== ""
|
||||
);
|
||||
get shouldShowNewPassword(): boolean {
|
||||
return this.originalSendView && this.originalSendView.password !== null;
|
||||
}
|
||||
|
||||
get shouldShowCount(): boolean {
|
||||
|
|
Loading…
Reference in New Issue