Merge pull request #4856 from GabrielInTheWorld/util-fixes

Fixes some autocompleted inputs
This commit is contained in:
Sean 2019-07-17 13:38:48 +02:00 committed by GitHub
commit ee9909308f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 3 deletions

View File

@ -31,6 +31,7 @@
<mat-form-field> <mat-form-field>
<input <input
matInput matInput
autocomplete="off"
osAutofocus osAutofocus
[(ngModel)]="inputControl" [(ngModel)]="inputControl"
placeholder="{{ extensionLabel }}" placeholder="{{ extensionLabel }}"

View File

@ -1,9 +1,10 @@
<div class="form-wrapper"> <div class="form-wrapper">
<form [formGroup]="newPasswordForm" (ngSubmit)="submitNewPassword()"> <form [formGroup]="newPasswordForm" (ngSubmit)="submitNewPassword()" autocomplete="off">
<h3 translate>Please enter your new password</h3> <h3 translate>Please enter your new password</h3>
<mat-form-field> <mat-form-field>
<input <input
matInput matInput
autocomplete="off"
required required
placeholder="{{ 'New password' | translate }}" placeholder="{{ 'New password' | translate }}"
formControlName="password" formControlName="password"

View File

@ -1,8 +1,8 @@
<div class="form-wrapper"> <div class="form-wrapper">
<form [formGroup]="resetPasswordForm" (ngSubmit)="resetPassword()"> <form [formGroup]="resetPasswordForm" (ngSubmit)="resetPassword()" autocomplete="off">
<h3 translate>Enter your email to send the password reset link</h3> <h3 translate>Enter your email to send the password reset link</h3>
<mat-form-field> <mat-form-field>
<input matInput required placeholder="{{ 'Email' | translate }}" formControlName="email" type="email" /> <input matInput required placeholder="{{ 'Email' | translate }}" formControlName="email" type="email" autocomplete="off" />
<mat-error *ngIf="resetPasswordForm.get('email').invalid" translate> <mat-error *ngIf="resetPasswordForm.get('email').invalid" translate>
Please enter a valid email address! Please enter a valid email address!
</mat-error> </mat-error>

View File

@ -55,11 +55,15 @@
<form [formGroup]="userPasswordForm" (keydown)="onKeyDown($event)"> <form [formGroup]="userPasswordForm" (keydown)="onKeyDown($event)">
<mat-form-field> <mat-form-field>
<input <input
[type]="hideOldPassword ? 'password' : 'text'"
matInput matInput
formControlName="oldPassword" formControlName="oldPassword"
placeholder="{{ 'Old password' | translate }}" placeholder="{{ 'Old password' | translate }}"
required required
/> />
<mat-icon mat-button matSuffix mat-icon-button (click)="hideOldPassword = !hideOldPassword">
{{ hideOldPassword ? 'visibility' : 'visibility_off' }}
</mat-icon>
</mat-form-field><br> </mat-form-field><br>
<mat-form-field> <mat-form-field>
<input <input

View File

@ -50,6 +50,11 @@ export class PasswordComponent extends BaseViewComponent implements OnInit {
*/ */
public hidePassword = true; public hidePassword = true;
/**
* if the old password should be shown
*/
public hideOldPassword = true;
private urlUserId: number | null; private urlUserId: number | null;
/** /**

View File

@ -105,6 +105,7 @@
<input <input
type="email" type="email"
matInput matInput
autocomplete="off"
placeholder="{{ 'Email' | translate }}" placeholder="{{ 'Email' | translate }}"
name="email" name="email"
formControlName="email" formControlName="email"
@ -164,6 +165,7 @@
<mat-form-field> <mat-form-field>
<input <input
matInput matInput
autocomplete="off"
placeholder="{{ 'Initial password' | translate }}" placeholder="{{ 'Initial password' | translate }}"
formControlName="default_password" formControlName="default_password"
[value]="user.default_password || ''" [value]="user.default_password || ''"