]>
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 | ||
b1d40cff | 20 | <a i18n *ngIf="signupAllowed === false" href="https://joinpeertube.org/en/#getting-started" target="_blank" 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 | > | |
b1d40cff | 42 | <div i18n class="forgot-password-button" (click)="openForgotPasswordModal()">I forgot my password</div> |
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 C |
52 | |
53 | <div bsModal #forgotPasswordModal="bs-modal" (onShown)="onForgotPasswordModalShown()" class="modal" tabindex="-1"> | |
54 | <div class="modal-dialog"> | |
55 | <div class="modal-content"> | |
56 | ||
57 | <div class="modal-header"> | |
58 | <span class="close" aria-hidden="true" (click)="hideForgotPasswordModal()"></span> | |
b1d40cff | 59 | <h4 i18n class="modal-title">Forgot your password</h4> |
ecb4e35f C |
60 | </div> |
61 | ||
62 | <div class="modal-body"> | |
63 | <div class="form-group"> | |
b1d40cff | 64 | <label i18n for="forgot-password-email">Email</label> |
ecb4e35f | 65 | <input |
b1d40cff | 66 | type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required |
ecb4e35f C |
67 | [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput |
68 | > | |
69 | </div> | |
70 | ||
71 | <div class="form-group inputs"> | |
b1d40cff | 72 | <span i18n class="action-button action-button-cancel" (click)="hideForgotPasswordModal()"> |
ecb4e35f C |
73 | Cancel |
74 | </span> | |
75 | ||
76 | <input | |
b1d40cff | 77 | type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit" |
ecb4e35f C |
78 | (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid" |
79 | > | |
80 | </div> | |
81 | </div> | |
82 | </div> | |
83 | </div> | |
84 | </div> |