]>
Commit | Line | Data |
---|---|---|
1 | <div class="margin-content"> | |
2 | <div i18n class="title-page title-page-single"> | |
3 | Login | |
4 | </div> | |
5 | ||
6 | <div class="alert alert-info" *ngIf="signupAllowed === false" role="alert"> | |
7 | <h6 class="alert-heading" i18n> | |
8 | If you are looking for an account… | |
9 | </h6> | |
10 | ||
11 | <div i18n> | |
12 | Currently this instance doesn't allow for user registration, but you can find an instance | |
13 | that gives you the possibility to sign up for an account and upload your videos there. | |
14 | ||
15 | <br /> | |
16 | ||
17 | Find yours among multiple instances at <a class="alert-link" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>. | |
18 | </div> | |
19 | </div> | |
20 | ||
21 | <div *ngIf="error" class="alert alert-danger">{{ error }} | |
22 | <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span> | |
23 | </div> | |
24 | ||
25 | <form role="form" (ngSubmit)="login()" [formGroup]="form"> | |
26 | <div class="form-group"> | |
27 | <div> | |
28 | <label i18n for="username">User</label> | |
29 | <input | |
30 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" | |
31 | formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #emailInput | |
32 | > | |
33 | <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account"> | |
34 | or create an account | |
35 | </a> | |
36 | </div> | |
37 | ||
38 | <div *ngIf="formErrors.username" class="form-error"> | |
39 | {{ formErrors.username }} | |
40 | </div> | |
41 | </div> | |
42 | ||
43 | <div class="form-group"> | |
44 | <label i18n for="password">Password</label> | |
45 | <div> | |
46 | <input | |
47 | type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" autocomplete="current-password" | |
48 | formControlName="password" class="form-control" [ngClass]="{ 'input-error': formErrors['password'] }" | |
49 | > | |
50 | <a i18n-title class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a> | |
51 | </div> | |
52 | <div *ngIf="formErrors.password" class="form-error"> | |
53 | {{ formErrors.password }} | |
54 | </div> | |
55 | </div> | |
56 | ||
57 | <input type="submit" i18n-value value="Login" [disabled]="!form.valid"> | |
58 | </form> | |
59 | </div> | |
60 | ||
61 | <ng-template #forgotPasswordModal> | |
62 | <div class="modal-header"> | |
63 | <h4 i18n class="modal-title">Forgot your password</h4> | |
64 | ||
65 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hideForgotPasswordModal()"></my-global-icon> | |
66 | </div> | |
67 | ||
68 | <div class="modal-body"> | |
69 | ||
70 | <div *ngIf="isEmailDisabled()" class="alert alert-danger" i18n> | |
71 | We are sorry, you cannot recover your password because your instance administrator did not configure the PeerTube email system. | |
72 | </div> | |
73 | ||
74 | <div class="form-group" [hidden]="isEmailDisabled()"> | |
75 | <label i18n for="forgot-password-email">Email</label> | |
76 | <input | |
77 | type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required | |
78 | [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput | |
79 | > | |
80 | </div> | |
81 | </div> | |
82 | ||
83 | <div class="modal-footer inputs"> | |
84 | <input | |
85 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | |
86 | (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()" | |
87 | > | |
88 | ||
89 | <input | |
90 | type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit" | |
91 | (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid" | |
92 | > | |
93 | </div> | |
94 | </ng-template> |