Add auto complete to user edit password

pull/5325/head
Chocobozzz 2022-10-10 15:39:27 +02:00
parent 5cc2f0ea0a
commit 8347f8a429
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 5 additions and 2 deletions

View File

@ -62,7 +62,8 @@ export abstract class UserEdit extends FormReactive implements OnInit {
displayDangerZone () {
if (this.isCreation()) return false
if (this.user?.pluginAuth) return false
if (!this.user) return false
if (this.user.pluginAuth) return false
if (this.auth.getUser().id === this.user.id) return false
return true

View File

@ -1,8 +1,10 @@
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
<div class="input-group">
<input id="password" [attr.type]="showPassword ? 'text' : 'password'" class="form-control"
<input id="password"
[attr.type]="showPassword ? 'text' : 'password'" class="form-control"
formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
autocomplete="new-password"
>
<button class="btn btn-sm btn-outline-secondary" (click)="togglePasswordVisibility()" type="button">
<ng-container *ngIf="!showPassword" i18n>Show</ng-container>