]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/login/login.component.html
Cleanup login form
[github/Chocobozzz/PeerTube.git] / client / src / app / login / login.component.html
index fa585c883af96d7d0cc9c53849c22277e473fe00..0b0bacff03eb77f93a6ff9880f1db7ed28a73177 100644 (file)
@@ -3,6 +3,21 @@
     Login
   </div>
 
+  <div class="alert alert-info" *ngIf="signupAllowed === false" role="alert">
+    <h6 class="alert-heading" i18n>
+      If you are looking for an account…
+    </h6>
+
+    <div i18n>
+      Currently this instance doesn't allow for user registration, but you can find an instance
+      that gives you the possibility to sign up for an account and upload your videos there.
+
+      <br />
+
+      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>.
+    </div>
+  </div>
+
   <div *ngIf="error" class="alert alert-danger">{{ error }}
     <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span>
   </div>
         <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account">
           or create an account
         </a>
-
-        <a i18n *ngIf="signupAllowed === false" href="https://joinpeertube.org/en/#register" target="_blank" title="Click here to see a list of instances where to register" class="create-an-account">
-          or create an account on another instance
-        </a>
-
-        <my-help
-          *ngIf="signupAllowed === false" helpType="custom" i18n-customHtml
-          customHtml="User registration is not allowed on this instance, but you can register on many others!"
-        ></my-help>
       </div>
 
       <div *ngIf="formErrors.username" class="form-error">
@@ -38,7 +44,7 @@
       <label i18n for="password">Password</label>
       <div>
         <input
-          type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2"
+          type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" autocomplete="current-password"
           formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
         >
         <a i18n class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a>
       </div>
     </div>
 
-    <input type="submit" value="Login" [disabled]="!form.valid">
+    <input type="submit" i18n-value value="Login" [disabled]="!form.valid">
   </form>
 </div>
 
 <ng-template #forgotPasswordModal>
   <div class="modal-header">
     <h4 i18n class="modal-title">Forgot your password</h4>
-    <span class="close" aria-hidden="true" (click)="hideForgotPasswordModal()"></span>
+
+    <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hideForgotPasswordModal()"></my-global-icon>
   </div>
 
   <div class="modal-body">
-    <div class="form-group">
+
+    <div *ngIf="isEmailDisabled()" class="alert alert-danger" i18n>
+      We are sorry, you cannot recover your password because your instance administrator did not configure the PeerTube email system.
+    </div>
+
+    <div class="form-group" [hidden]="isEmailDisabled()">
       <label i18n for="forgot-password-email">Email</label>
       <input
         type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required