]>
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 | |
d235f6b0 | 6 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> |
b1794c53 | 7 | |
d235f6b0 C |
8 | <form role="form" (ngSubmit)="login()" [formGroup]="form"> |
9 | <div class="form-group"> | |
2b084d70 | 10 | <div> |
b1d40cff | 11 | <label i18n for="username">User</label> |
2b084d70 | 12 | <input |
b1d40cff | 13 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" |
2b084d70 C |
14 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" |
15 | > | |
b1d40cff | 16 | <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account"> |
2b084d70 C |
17 | or create an account |
18 | </a> | |
19 | ||
696fa4c0 | 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"> |
2b084d70 C |
21 | or create an account on another instance |
22 | </a> | |
23 | ||
24 | <my-help | |
b1d40cff | 25 | *ngIf="signupAllowed === false" helpType="custom" i18n-customHtml |
2b084d70 C |
26 | customHtml="User registration is not allowed on this instance, but you can register on many others!" |
27 | ></my-help> | |
28 | </div> | |
29 | ||
a2b817d3 | 30 | <div *ngIf="formErrors.username" class="form-error"> |
d235f6b0 | 31 | {{ formErrors.username }} |
897ec54d | 32 | </div> |
d235f6b0 | 33 | </div> |
b1794c53 | 34 | |
d235f6b0 | 35 | <div class="form-group"> |
b1d40cff | 36 | <label i18n for="password">Password</label> |
ecb4e35f C |
37 | <div> |
38 | <input | |
b1d40cff | 39 | type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" |
ecb4e35f C |
40 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" |
41 | > | |
696fa4c0 | 42 | <a i18n class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a> |
ecb4e35f | 43 | </div> |
a2b817d3 | 44 | <div *ngIf="formErrors.password" class="form-error"> |
d235f6b0 | 45 | {{ formErrors.password }} |
897ec54d | 46 | </div> |
d235f6b0 | 47 | </div> |
897ec54d | 48 | |
d235f6b0 C |
49 | <input type="submit" value="Login" [disabled]="!form.valid"> |
50 | </form> | |
897ec54d | 51 | </div> |
ecb4e35f | 52 | |
63347a0f C |
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> | |
ecb4e35f | 58 | |
63347a0f C |
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> | |
ecb4e35f | 68 | |
63347a0f C |
69 | <div class="modal-footer inputs"> |
70 | <span i18n class="action-button action-button-cancel" (click)="hideForgotPasswordModal()">Cancel</span> | |
ecb4e35f | 71 | |
63347a0f C |
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 | > | |
ecb4e35f | 76 | </div> |
63347a0f | 77 | </ng-template> |