fixed how the dialog was passing data back to the parent component
parent
6d6408b6b6
commit
79129190c8
|
@ -61,7 +61,12 @@ export class InternalLoginComponent implements OnInit {
|
|||
{width: '320px', data: this.loginForm.controls['email']}
|
||||
);
|
||||
dialogRef.afterClosed().subscribe(
|
||||
() => { this.resetPassword(); }
|
||||
(result) => {
|
||||
if (result) {
|
||||
this.loginForm.controls['email'].setValue(result);
|
||||
this.resetPassword();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [disabled]="!dialogData.valid" (click)="onSubmit()">
|
||||
<button mat-button id="cancel-button" (click)="onCancelClick()">CANCEL</button>
|
||||
<button mat-button id="submit-button" [disabled]="!dialogData.valid" [matDialogClose]="dialogData.value">
|
||||
SUBMIT
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,11 @@ mat-form-field {
|
|||
min-width: 270px;
|
||||
}
|
||||
|
||||
button {
|
||||
#cancel-button {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
#submit-button {
|
||||
@include action-button-primary;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ export class PasswordResetComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
onCancelClick() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue