use signal forms

This commit is contained in:
toni
2026-01-03 01:17:40 +01:00
parent 00235a769a
commit 5a19b3a7a6
12 changed files with 298 additions and 296 deletions
@@ -1,23 +1,23 @@
<h1>Neues Mitglied anlegen</h1>
<form [formGroup]="memberForm" (ngSubmit)="onSubmit()">
<form>
<mat-form-field>
<mat-label>Vorname</mat-label>
<input matInput formControlName="vorname" />
<input matInput [field]="memberForm.vorname" />
</mat-form-field>
<mat-form-field>
<mat-label>Nachname</mat-label>
<input matInput formControlName="nachname" />
<input matInput [field]="memberForm.nachname" />
</mat-form-field>
<mat-form-field>
<mat-label>Geschlecht</mat-label>
<input matInput formControlName="geschlecht" />
<input matInput [field]="memberForm.geschlecht" />
</mat-form-field>
<mat-form-field>
<mat-label>Geburtsdatum</mat-label>
<input
matInput
[matDatepicker]="picker"
formControlName="geburtsdatum" />
[field]="memberForm.geburtsdatum" />
<mat-hint>DD.MM.YYYY</mat-hint>
<mat-datepicker-toggle
matIconSuffix
@@ -26,18 +26,18 @@
</mat-form-field>
<mat-form-field>
<mat-label>Geburtsort</mat-label>
<input matInput formControlName="geburtsort" />
<input matInput [field]="memberForm.geburtsort" />
</mat-form-field>
<mat-checkbox [formControl]="memberForm.controls.verein"
>Verein Beigetreten?</mat-checkbox
>
<mat-checkbox [field]="memberForm.verein">Verein Beigetreten?</mat-checkbox>
<mat-form-field>
<mat-label>Passnummer (falls vorhanden)</mat-label>
<input matInput formControlName="passnummer" />
<input matInput [field]="memberForm.passnummer" />
</mat-form-field>
<mat-form-field>
<mat-label>Kontakt</mat-label>
<input matInput formControlName="kontakt" />
<input matInput [field]="memberForm.kontakt" />
</mat-form-field>
<button mat-flat-button color="primary" type="submit">Hinzufügen</button>
<button mat-flat-button color="primary" (click)="onSubmit()">
Hinzufügen
</button>
</form>