diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-04 15:58:55 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-04 16:01:53 +0100 |
commit | f8b530e0a523a0d9ff469ef716838374c395a360 (patch) | |
tree | a55d49365e539582dd5000a2c73b9351df93a52d /client/src/app/+my-account/my-account-settings/my-account-change-email | |
parent | aa5ee5017a83b280352f8dbcfed2d4741709a4fd (diff) | |
download | PeerTube-f8b530e0a523a0d9ff469ef716838374c395a360.tar.gz PeerTube-f8b530e0a523a0d9ff469ef716838374c395a360.tar.zst PeerTube-f8b530e0a523a0d9ff469ef716838374c395a360.zip |
unify inputs requiring buttons like password inputs
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-change-email')
2 files changed, 15 insertions, 9 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html index ce176d682..29823bdec 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html | |||
@@ -12,9 +12,8 @@ | |||
12 | <form role="form" class="change-email" (ngSubmit)="changeEmail()" [formGroup]="form" *ngIf="user.pluginAuth === null"> | 12 | <form role="form" class="change-email" (ngSubmit)="changeEmail()" [formGroup]="form" *ngIf="user.pluginAuth === null"> |
13 | 13 | ||
14 | <div class="form-group"> | 14 | <div class="form-group"> |
15 | <label i18n for="new-email">New email</label> | ||
16 | <input | 15 | <input |
17 | type="email" id="new-email" i18n-placeholder placeholder="Your new email" class="form-control" | 16 | type="email" id="new-email" i18n-placeholder placeholder="New email" class="form-control" |
18 | formControlName="new-email" [ngClass]="{ 'input-error': formErrors['new-email'] }" | 17 | formControlName="new-email" [ngClass]="{ 'input-error': formErrors['new-email'] }" |
19 | > | 18 | > |
20 | <div *ngIf="formErrors['new-email']" class="form-error"> | 19 | <div *ngIf="formErrors['new-email']" class="form-error"> |
@@ -23,11 +22,11 @@ | |||
23 | </div> | 22 | </div> |
24 | 23 | ||
25 | <div class="form-group"> | 24 | <div class="form-group"> |
26 | <label i18n for="new-email">Your current password</label> | 25 | <my-input-toggle-hidden formControlName="password" |
27 | <input | 26 | id="password" |
28 | type="password" id="password" i18n-placeholder placeholder="Your password" autocomplete="off" | 27 | i18n-placeholder placeholder="Current password" |
29 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" class="form-control" | 28 | [ngClass]="{ 'input-error': formErrors['password'] }" |
30 | > | 29 | autocomplete="current-password"></my-input-toggle-hidden> |
31 | <div *ngIf="formErrors['password']" class="form-error"> | 30 | <div *ngIf="formErrors['password']" class="form-error"> |
32 | {{ formErrors['password'] }} | 31 | {{ formErrors['password'] }} |
33 | </div> | 32 | </div> |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.scss b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.scss index aec709ea0..a8b9be0d1 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.scss +++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.scss | |||
@@ -6,7 +6,11 @@ label { | |||
6 | font-size: 100%; | 6 | font-size: 100%; |
7 | } | 7 | } |
8 | 8 | ||
9 | input[type=password], | 9 | my-input-toggle-hidden { |
10 | width: 340px; | ||
11 | display: block; | ||
12 | } | ||
13 | |||
10 | input[type=email] { | 14 | input[type=email] { |
11 | @include peertube-input-text(340px); | 15 | @include peertube-input-text(340px); |
12 | 16 | ||
@@ -20,10 +24,13 @@ input[type=submit] { | |||
20 | 24 | ||
21 | .current-email, | 25 | .current-email, |
22 | .pending-email { | 26 | .pending-email { |
23 | font-size: 16px; | ||
24 | margin-bottom: 15px; | 27 | margin-bottom: 15px; |
25 | 28 | ||
26 | .email { | 29 | .email { |
27 | font-weight: $font-semibold; | 30 | font-weight: $font-semibold; |
28 | } | 31 | } |
29 | } | 32 | } |
33 | |||
34 | .form-group { | ||
35 | width: max-content; | ||
36 | } | ||