aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/signup/signup.component.html
blob: ebedc2ae718999f9cdce71093556cfb8d4a2a905 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<p>Signup:</p>
<div>
    <input placeholder="Username" type="text" (input)="validate(username.value, confirmPass.value, password.value)" #username>
    <span *ngIf="usernameStatusText">{{usernameStatusText | async}}</span>
</div>

<div>
    <input placeholder="Password" type="password" (input)="validate(username.value, confirmPass.value, password.value)" #password>
    <progress [ngClass]="'color' + strength.getValue()" id="bar" [value]="strength | async" max="6">  </progress>
    <span *ngIf="passwordStatusText">{{passwordStatusText | async}}</span>

    <span *ngFor="let requirement of Object.values(passwordRequirements)">
        <span *ngIf="passwordRequirements" [style.color]="requirement.value ? 'green' : 'red'"> {{requirement.title}} </span>
    </span>
</div>

<div>
    <input placeholder="Confirm password" type="password" (input)="validate(username.value, confirmPass.value, password.value)" #confirmPass>
    <span *ngIf="confirmPassStatusText">{{confirmPassStatusText | async}}</span>
</div>

<div>
    <button [disabled]="!(ableToCreateAccount | async)" (click)="signup(username.value, password.value)">Create Account</button>
    <span *ngIf="showSuccessMessage | async">Account created <a routerLink="/login">Proceed to login</a></span>
    <span *ngIf="statusText | async">{{statusText | async}}</span>
</div>