/
login.component.html
62 lines (53 loc) · 2.55 KB
/
login.component.html
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<app-page>
<app-page-head>
<app-page-head-title><strong>Login</strong></app-page-head-title>
</app-page-head>
<form #loginForm="ngForm" name="loginForm" role="form" (ngSubmit)="login()" novalidate>
<div *ngIf="securityInfo.isAuthenticationEnabled && !securityInfo.isAuthenticated" dataflowLayoutType type="small">
<div class="dataflow-alert dataflow-alert-info">
<p *ngIf="securityInfo.isAuthenticationEnabled && !securityInfo.isAuthenticated">
Please sign in
</p>
<p *ngIf="securityInfo.isAuthenticated">
Please sign out first
</p>
<p *ngIf="!securityInfo.isAuthenticationEnabled">
No need to login, authentication is not enabled.
</p>
</div>
<div class="form-group" [class.has-error]="username.invalid && username.touched">
<label for="username" class="control-label">Username</label>
<div class="input-wrapper">
<input #username="ngModel" type="text" id="username" name="username" [dataflowFocus]="true"
[(ngModel)]="user.username"
required
class="form-control" placeholder="<Username>">
<span class="help-block"
*ngIf="username.invalid && username.touched">Please provide a valid username.</span>
</div>
</div>
<div class="form-group" [class.has-error]="password.invalid && password.touched">
<label for="password" class="control-label">Password</label>
<div class="input-wrapper">
<input #password="ngModel" type="text" id="password" name="password" type="password"
[(ngModel)]="user.password" required
class="form-control" placeholder="<Password>">
<span class="glyphicon glyphicon-arrow-up form-control-feedback" dataflowCapsLock></span>
<span class="help-block"
*ngIf="password.invalid && password.touched">Please provide a valid password.</span>
</div>
</div>
</div>
<app-page-actions *ngIf="securityInfo.isAuthenticationEnabled && !securityInfo.isAuthenticated">
<button class="btn btn-primary" id="loginButton" type="submit" [disabled]="loginForm.invalid">
Sign in
</button>
</app-page-actions>
<p *ngIf="securityInfo.isAuthenticated">
<a class="btn btn-primary" id="logoutButton" routerLink="../logout">Sign out</a>
</p>
<p *ngIf="!securityInfo.isAuthenticationEnabled">
<a class="btn btn-default" id="backButton" routerLink="/apps">Back to the app</a>
</p>
</form>
</app-page>