]>
Commit | Line | Data |
---|---|---|
d235f6b0 | 1 | <div class="margin-content"> |
b1d40cff | 2 | <div i18n class="title-page title-page-single"> |
d235f6b0 C |
3 | Login |
4 | </div> | |
192ea60b | 5 | |
d9eaee39 JM |
6 | <div *ngIf="error" class="alert alert-danger">{{ error }} |
7 | <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span> | |
8 | </div> | |
b1794c53 | 9 | |
d235f6b0 C |
10 | <form role="form" (ngSubmit)="login()" [formGroup]="form"> |
11 | <div class="form-group"> | |
2b084d70 | 12 | <div> |
b1d40cff | 13 | <label i18n for="username">User</label> |
2b084d70 | 14 | <input |
b1d40cff | 15 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" |
9fe44067 | 16 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" #emailInput |
2b084d70 | 17 | > |
b1d40cff | 18 | <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account"> |
2b084d70 C |
19 | or create an account |
20 | </a> | |
21 | ||
7bdd917a | 22 | <a i18n *ngIf="signupAllowed === false" href="https://joinpeertube.org/en/#instances-list" target="_blank" title="Click here to see a list of instances where to register" class="create-an-account"> |
2b084d70 C |
23 | or create an account on another instance |
24 | </a> | |
25 | ||
26 | <my-help | |
b1d40cff | 27 | *ngIf="signupAllowed === false" helpType="custom" i18n-customHtml |
2b084d70 C |
28 | customHtml="User registration is not allowed on this instance, but you can register on many others!" |
29 | ></my-help> | |
30 | </div> | |
31 | ||
a2b817d3 | 32 | <div *ngIf="formErrors.username" class="form-error"> |
d235f6b0 | 33 | {{ formErrors.username }} |
897ec54d | 34 | </div> |
d235f6b0 | 35 | </div> |
b1794c53 | 36 | |
d235f6b0 | 37 | <div class="form-group"> |
b1d40cff | 38 | <label i18n for="password">Password</label> |
ecb4e35f C |
39 | <div> |
40 | <input | |
b1d40cff | 41 | type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" |
ecb4e35f C |
42 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" |
43 | > | |
696fa4c0 | 44 | <a i18n class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a> |
ecb4e35f | 45 | </div> |
a2b817d3 | 46 | <div *ngIf="formErrors.password" class="form-error"> |
d235f6b0 | 47 | {{ formErrors.password }} |
897ec54d | 48 | </div> |
d235f6b0 | 49 | </div> |
897ec54d | 50 | |
baf0a8c9 | 51 | <input type="submit" i18n-value value="Login" [disabled]="!form.valid"> |
d235f6b0 | 52 | </form> |
897ec54d | 53 | </div> |
ecb4e35f | 54 | |
63347a0f C |
55 | <ng-template #forgotPasswordModal> |
56 | <div class="modal-header"> | |
57 | <h4 i18n class="modal-title">Forgot your password</h4> | |
58 | <span class="close" aria-hidden="true" (click)="hideForgotPasswordModal()"></span> | |
59 | </div> | |
ecb4e35f | 60 | |
63347a0f C |
61 | <div class="modal-body"> |
62 | <div class="form-group"> | |
63 | <label i18n for="forgot-password-email">Email</label> | |
64 | <input | |
65 | type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required | |
66 | [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput | |
67 | > | |
68 | </div> | |
69 | </div> | |
ecb4e35f | 70 | |
63347a0f C |
71 | <div class="modal-footer inputs"> |
72 | <span i18n class="action-button action-button-cancel" (click)="hideForgotPasswordModal()">Cancel</span> | |
ecb4e35f | 73 | |
63347a0f C |
74 | <input |
75 | type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit" | |
76 | (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid" | |
77 | > | |
ecb4e35f | 78 | </div> |
63347a0f | 79 | </ng-template> |