]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/login/login.component.html
Add ability to ban/unban users
[github/Chocobozzz/PeerTube.git] / client / src / app / login / login.component.html
1 <div class="margin-content">
2 <div i18n class="title-page title-page-single">
3 Login
4 </div>
5
6 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
7
8 <form role="form" (ngSubmit)="login()" [formGroup]="form">
9 <div class="form-group">
10 <div>
11 <label i18n for="username">User</label>
12 <input
13 type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1"
14 formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
15 >
16 <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account">
17 or create an account
18 </a>
19
20 <a i18n *ngIf="signupAllowed === false" href="https://joinpeertube.org/en/#getting-started" target="_blank" title="Click here to see how to get started!" class="create-an-account">
21 or create an account on another instance
22 </a>
23
24 <my-help
25 *ngIf="signupAllowed === false" helpType="custom" i18n-customHtml
26 customHtml="User registration is not allowed on this instance, but you can register on many others!"
27 ></my-help>
28 </div>
29
30 <div *ngIf="formErrors.username" class="form-error">
31 {{ formErrors.username }}
32 </div>
33 </div>
34
35 <div class="form-group">
36 <label i18n for="password">Password</label>
37 <div>
38 <input
39 type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2"
40 formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
41 >
42 <a i18n class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a>
43 </div>
44 <div *ngIf="formErrors.password" class="form-error">
45 {{ formErrors.password }}
46 </div>
47 </div>
48
49 <input type="submit" value="Login" [disabled]="!form.valid">
50 </form>
51 </div>
52
53 <ng-template #forgotPasswordModal>
54 <div class="modal-header">
55 <h4 i18n class="modal-title">Forgot your password</h4>
56 <span class="close" aria-hidden="true" (click)="hideForgotPasswordModal()"></span>
57 </div>
58
59 <div class="modal-body">
60 <div class="form-group">
61 <label i18n for="forgot-password-email">Email</label>
62 <input
63 type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required
64 [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput
65 >
66 </div>
67 </div>
68
69 <div class="modal-footer inputs">
70 <span i18n class="action-button action-button-cancel" (click)="hideForgotPasswordModal()">Cancel</span>
71
72 <input
73 type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit"
74 (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid"
75 >
76 </div>
77 </ng-template>