57 lines
2 KiB
HTML
57 lines
2 KiB
HTML
<div class="myContainer">
|
|
<div class="boite">
|
|
|
|
<h3>Modifier</h3>
|
|
|
|
<!-- divider -->
|
|
<mat-divider></mat-divider><br>
|
|
|
|
<!-- role -->
|
|
<mat-radio-group [(ngModel)]="is_admin">
|
|
<mat-radio-button [value]="false"
|
|
[checked]="!is_admin">Utilisateur</mat-radio-button>
|
|
<mat-radio-button [value]="true"
|
|
[checked]="is_admin">Admin</mat-radio-button>
|
|
</mat-radio-group><br><br>
|
|
|
|
<!-- divider -->
|
|
<mat-divider></mat-divider><br>
|
|
|
|
<!-- Modifier mot de passe -->
|
|
<div>
|
|
Modifier mot de passe:
|
|
<mat-checkbox [(ngModel)]="changePassword"></mat-checkbox>
|
|
</div>
|
|
|
|
<!-- nouveau mot de passe -->
|
|
<div *ngIf="changePassword" style="margin-top: 10px">
|
|
<!-- Nouveau mot de passe -->
|
|
<mat-form-field appearance="fill">
|
|
<mat-label>Nouveau mot de passe</mat-label>
|
|
<input matInput type="password" [(ngModel)]="newPassword">
|
|
</mat-form-field>
|
|
<br>
|
|
<!-- Confirmation npuveau mot de passe -->
|
|
<mat-form-field appearance="fill">
|
|
<mat-label>Confirmation nouveau mot de passe</mat-label>
|
|
<input matInput type="password" [(ngModel)]="confirmNewPassword">
|
|
</mat-form-field>
|
|
</div>
|
|
<div *ngIf="!changePassword"><br></div>
|
|
|
|
<!-- divider -->
|
|
<mat-divider></mat-divider><br>
|
|
|
|
<!-- message d'erreur -->
|
|
<div *ngIf="hasError" style="text-align: center; margin-bottom: 20px;">
|
|
<span class="mat-error">{{errorMessage}}</span>
|
|
</div>
|
|
|
|
<!-- boutons -->
|
|
<div style="width: 100%; text-align: right">
|
|
<button mat-button (click)="this.dialogRef.close(null)"> Annuler </button>
|
|
<button mat-button (click)="onValider()"> Enregistrer </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|