Commit 72abfd77 authored by Emily Jensen's avatar Emily Jensen

Added errors

parent bb0902e4
......@@ -33,7 +33,7 @@
<app-non-field-messages *ngIf="errorMessage || localErrorMessage" [messages]="[errorMessage, localErrorMessage]"></app-non-field-messages>
<div class="u-margin-b-20">
<div class="u-margin-b-20" [class.u-invisible]="cameraError">
<button id="scan-qr-button" (click)="toggleScan()" class="button button--primary">Scan QR Code</button>
<span class="text-next-to-button u-margin-l-20">or</span>
</div>
......@@ -57,7 +57,15 @@
</div>
<form [ngrxFormState]="form" (submit)="onSubmit()">
<div class="form-field form-field--large">
<div class="form-field form-field--large u-margin-t-15">
<ul class="form-field__error-list">
<li class="form-field__error">
{{cameraError}}
</li>
<li *ngIf="errorMessage" class="form-field__error">
{{errorMessage}}
</li>
</ul>
<label [for]="form.controls.code.id" class="form-field__label">
Type Backup Code
</label>
......@@ -68,16 +76,13 @@
spellcheck="false"
class="form-field__input"
[class.form-field__input--invalid]="form.errors._code && form.isSubmitted"
/>
</div>
<ul *ngIf="form.errors._code && form.isSubmitted" class="form-field__error-list">
<li *ngIf="form.errors._code.minLength" class="form-field__error">
The QR code provided a backup code that did not work.
<li *ngIf="form.errors._code" class="form-field__error">
You must enter a backup code.
</li>
</ul>
<div class="verify-backup-code__actions">
<button id="loginSubmit" class="button button--large button--green" [disabled]="hasStarted" type="submit">
Next
......
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