Commit 64680b6b authored by Emily Jensen's avatar Emily Jensen

Added download backup code styling

parent f4091e37
......@@ -6,7 +6,7 @@
Change Account Password
</h2>
<form novalidate [ngrxFormState]="form" (submit)="onSubmit()">
<form novalidate [ngrxFormState]="form" (submit)="onSubmit()" *ngIf="!hasFinished" class="form-field form-field--large">
<app-non-field-messages [messages]="nonFieldErrors"></app-non-field-messages>
<div class="form-field form-field--large">
......@@ -47,5 +47,20 @@
<div class="change-password__note" [@flyInOut]="true" *ngIf="hasStarted">
We’re currently changing your password. This takes a little while, so don’t navigate away.
</div>
</form>
<div class="form-field form-field--large">
<app-form-label
*ngIf="hasFinished"
[isLarge]="true"
[isComplete]="true"
>
Change Password
</app-form-label>
</div>
<app-download-backup-code
[hasFinished]="hasFinished"
class="register-step__feedback"
[code]="backupCode">
</app-download-backup-code>
</div>
\ No newline at end of file
......@@ -17,6 +17,8 @@ export class ChangePasswordComponent {
@Input()
hasFinished: boolean;
@Input()
backupCode: string;
@Input()
nonFieldErrors: string[];
@Output()
changePassword = new EventEmitter();
......
......@@ -17,6 +17,7 @@ import { SetValueAction } from "ngrx-forms";
[hasStarted]="hasStarted"
[hasFinished]="hasFinished"
[nonFieldErrors]="nonFieldErrors"
[backupCode]="backupCode"
(changePassword)="changePassword()"
(toggleConfirm)="toggleConfirm()"
(onForgotPassword)="onForgotPassword()">
......@@ -30,6 +31,7 @@ export class ChangePasswordContainer {
showConfirm: boolean;
nonFieldErrors: string[];
clickMessage = "";
backupCode = "CBVDCH4G23MJ46FXJBR8GDX4WKBF97VR";
constructor(
private store: Store<fromRoot.IState>,
......@@ -73,8 +75,8 @@ export class ChangePasswordContainer {
.then(() => {
this.hasStarted = false;
this.hasFinished = true;
this.store.dispatch(new LogoutAction());
setTimeout(() => (this.hasFinished = false), 5000);
// this.store.dispatch(new LogoutAction());
// setTimeout(() => (this.hasFinished = false), 5000);
})
.catch(err => {
this.hasStarted = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment