]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/login/login.component.html
Migrate to bootstrap 4 and ng-bootstrap
[github/Chocobozzz/PeerTube.git] / client / src / app / login / login.component.html
CommitLineData
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 (onShown)="onForgotPasswordModalShown()">-->
54<ng-template #forgotPasswordModal>
55 <div class="modal-header">
56 <h4 i18n class="modal-title">Forgot your password</h4>
57 <span class="close" aria-hidden="true" (click)="hideForgotPasswordModal()"></span>
58 </div>
ecb4e35f 59
63347a0f
C
60 <div class="modal-body">
61 <div class="form-group">
62 <label i18n for="forgot-password-email">Email</label>
63 <input
64 type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required
65 [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput
66 >
67 </div>
68 </div>
ecb4e35f 69
63347a0f
C
70 <div class="modal-footer inputs">
71 <span i18n class="action-button action-button-cancel" (click)="hideForgotPasswordModal()">Cancel</span>
ecb4e35f 72
63347a0f
C
73 <input
74 type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit"
75 (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid"
76 >
ecb4e35f 77 </div>
63347a0f 78</ng-template>