refactor(user-update-form.component.css): Angeordnete CSSS anstatt Bootstrap zu verwenden
This commit is contained in:
parent
80a3f96404
commit
4d38cce459
@ -1,72 +1,45 @@
|
|||||||
<div class="container my-3">
|
<div class="dd-container">
|
||||||
<div class="row">
|
<div class="dd-row input-row">
|
||||||
<div [ngClass]="formFieldBSClass">
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Benutzername</mat-label>
|
<mat-label>Benutzername</mat-label>
|
||||||
<input
|
<input matInput [formControl]="username" (blur)="updateErrorMessage()" required />
|
||||||
matInput
|
|
||||||
[formControl]="username"
|
|
||||||
(blur)="updateErrorMessage()"
|
|
||||||
required />
|
|
||||||
@if (email.invalid) {
|
@if (email.invalid) {
|
||||||
<mat-error>{{errorMessage()}}</mat-error>
|
<mat-error>{{errorMessage()}}</mat-error>
|
||||||
}
|
}
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
|
||||||
<div [ngClass]="formFieldBSClass">
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>E-Mail</mat-label>
|
<mat-label>E-Mail</mat-label>
|
||||||
<input
|
<input matInput placeholder="user@example.com" [formControl]="email" (blur)="updateMailErrorMessage()"
|
||||||
matInput placeholder="user@example.com"
|
|
||||||
[formControl]="email"
|
|
||||||
(blur)="updateMailErrorMessage()"
|
|
||||||
required />
|
required />
|
||||||
@if (email.invalid) {
|
@if (email.invalid) {
|
||||||
<mat-error>{{mailErrorMessage()}}</mat-error>
|
<mat-error>{{mailErrorMessage()}}</mat-error>
|
||||||
}
|
}
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div [ngClass]="formFieldBSClass">
|
<div class="dd-row input-row">
|
||||||
<div [ngClass]="buttonBSClass">
|
<mat-form-field>
|
||||||
|
<mat-label>Vorname</mat-label>
|
||||||
|
<input matInput [formControl]="name" (blur)="updateErrorMessage()" required />
|
||||||
|
@if (email.invalid) {
|
||||||
|
<mat-error>{{errorMessage()}}</mat-error>
|
||||||
|
}
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>Nachname</mat-label>
|
||||||
|
<input matInput [formControl]="surname" (blur)="updateErrorMessage()" required />
|
||||||
|
@if (email.invalid) {
|
||||||
|
<mat-error>{{errorMessage()}}</mat-error>
|
||||||
|
}
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="dd-row button-row">
|
||||||
<button mat-fab extended (click)="update()">
|
<button mat-fab extended (click)="update()">
|
||||||
<mat-icon>save</mat-icon>
|
<mat-icon>save</mat-icon>
|
||||||
Speichern
|
Speichern
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div [ngClass]="formFieldBSClass">
|
|
||||||
<mat-form-field>
|
|
||||||
<mat-label>Vorname</mat-label>
|
|
||||||
<input
|
|
||||||
matInput
|
|
||||||
[formControl]="name"
|
|
||||||
(blur)="updateErrorMessage()"
|
|
||||||
required />
|
|
||||||
@if (email.invalid) {
|
|
||||||
<mat-error>{{errorMessage()}}</mat-error>
|
|
||||||
}
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div [ngClass]="formFieldBSClass">
|
|
||||||
<mat-form-field>
|
|
||||||
<mat-label>Nachname</mat-label>
|
|
||||||
<input
|
|
||||||
matInput
|
|
||||||
[formControl]="surname"
|
|
||||||
(blur)="updateErrorMessage()"
|
|
||||||
required />
|
|
||||||
@if (email.invalid) {
|
|
||||||
<mat-error>{{errorMessage()}}</mat-error>
|
|
||||||
}
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div [ngClass]="formFieldBSClass">
|
|
||||||
<button mat-fab extended (click)="delete()">
|
<button mat-fab extended (click)="delete()">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
Löschen
|
Löschen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
.dd-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0;
|
||||||
|
margin: 1rem 0 1rem 0;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-row {
|
||||||
|
justify-content: space-evenly;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-row {
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
mat-form-field {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 1rem 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin: 0 1rem 0 1rem;
|
||||||
|
}
|
||||||
@ -36,9 +36,6 @@ export class UserUpdateFormComponent {
|
|||||||
mailErrorMessage = signal('');
|
mailErrorMessage = signal('');
|
||||||
errorMessage = signal('');
|
errorMessage = signal('');
|
||||||
|
|
||||||
public readonly formFieldBSClass: string = "col d-flex justify-content-center mx-1 my-2"
|
|
||||||
public readonly buttonBSClass: string = "d-flex justify-content-center mx-1 my-2"
|
|
||||||
|
|
||||||
constructor(private uService: UserService, private rService: RefreshService) {
|
constructor(private uService: UserService, private rService: RefreshService) {
|
||||||
merge(
|
merge(
|
||||||
this.email.statusChanges, this.email.valueChanges)
|
this.email.statusChanges, this.email.valueChanges)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user