Évol autour des infos/formulaires du harnais

This commit is contained in:
Sébastien André
2019-12-04 12:05:02 +01:00
parent 789c190c95
commit ac3dec8193
5 changed files with 70 additions and 25 deletions

View File

@@ -1,7 +1,32 @@
<form [formGroup]="addForm" (ngSubmit)="onSubmit(addForm.value)">
<div>
<label for="aircraftName">Aircraft name</label>
<input id="aircraftName" type="text" formControlName="aircraftName">
<label for="name">Name of gear</label>
<input id="name" type="text" formControlName="name">
</div>
<div>
<label for="manufacturer">Manufacturer</label>
<input id="manufacturer" type="text" formControlName="manufacturer">
</div>
<div>
<label for="minSize">Min size of canopy</label>
<input id="minSize" type="text" formControlName="minSize">
</div>
<div>
<label for="maxSize">Max size of canopy</label>
<input id="maxSize" type="text" formControlName="maxSize">
</div>
<div>
<label for="aad">AAD system</label>
<input id="aad" type="text" formControlName="aad">
</div>
<div>
<label for="mainCanopy">Main Canopy</label>
<input id="mainCanopy" type="text" formControlName="mainCanopy">
</div>
<div>
<label for="reserveCanopy">Reserve canopy</label>
<input id="reserveCanopy" type="text" formControlName="reserveCanopy">
</div>
<button class="button" type="submit">Add</button>
</form>

View File

@@ -11,7 +11,13 @@ export class NewGearComponent implements OnInit {
constructor() {
this.addForm = new FormGroup({
aircraftName: new FormControl('', Validators.required)
name: new FormControl('', Validators.required),
manufacturer: new FormControl('', Validators.required),
minSize: new FormControl('', Validators.required),
maxSize: new FormControl('', Validators.required),
aad: new FormControl('', Validators.required),
mainCanopy: new FormControl('', Validators.required),
reserveCanopy: new FormControl('', Validators.required),
});
}