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