Modification pour avoir un submit du

formulaire correcte
This commit is contained in:
Sébastien André
2019-10-29 16:56:43 +01:00
parent 659bbed322
commit 5c7eaa61c8

View File

@@ -1,7 +1,7 @@
<form class="example-container" (ngSubmit)="onFormSubmit()" [ngModelOptions]="{standalone: true}">
<form class="example-container" (ngSubmit)="onFormSubmit()">
<mat-form-field>
<mat-label>Choose the jump type</mat-label>
<mat-select [(value)]="selectedJumpType">
<mat-select [(ngModel)]="selectedJumpType" name="selectedJumpType">
<mat-option value="1">Option 1</mat-option>
<mat-option value="2" disabled>Option 2 (disabled)</mat-option>
<mat-option value="3">Option 3</mat-option>
@@ -10,7 +10,7 @@
<mat-form-field>
<mat-label>Choose the aircraft</mat-label>
<mat-select [(value)]="selectedAircraft">
<mat-select [(ngModel)]="selectedAircraft" name="selectedAircraft">
<mat-option value="4">Option 1</mat-option>
<mat-option value="5">Option 2</mat-option>
</mat-select>
@@ -18,34 +18,42 @@
<mat-form-field>
<mat-label>Choose the DZ</mat-label>
<mat-select [(value)]="selectedDz">
<mat-select [(ngModel)]="selectedDz" name="selectedDz">
<mat-option value="6">Option 1</mat-option>
<mat-option value="7">Option 2</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox [(checked)]="withCutaway">With a cutaway ?</mat-checkbox>
<mat-form-field>
<mat-label>Choose the used Rig</mat-label>
<mat-select [(ngModel)]="selectedRig" name="selectedRig">
<mat-option value="8">Option 1</mat-option>
<mat-option value="9">Option 3</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox [(ngModel)]="withCutaway" name="withCutaway">With a cutaway ?</mat-checkbox>
<mat-form-field>
<input matInput [matDatepicker]="beginDateDp" [value]="beginDate.value" disabled>
<input matInput [matDatepicker]="beginDateDp" [(ngModel)]="beginDate" name="beginDate" disabled>
<mat-datepicker-toggle matSuffix [for]="beginDateDp"></mat-datepicker-toggle>
<mat-datepicker #beginDateDp disabled="false"></mat-datepicker>
</mat-form-field>
<mat-form-field>
<input matInput [matDatepicker]="endDateDp" [value]="endDate.value" disabled>
<input matInput [matDatepicker]="endDateDp" [(ngModel)]="endDate" name="endDate" disabled>
<mat-datepicker-toggle matSuffix [for]="endDateDp"></mat-datepicker-toggle>
<mat-datepicker #endDateDp disabled="false"></mat-datepicker>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Exit altitude" [(value)]="defaultExitAltitude">
<input matInput placeholder="Exit altitude" [(ngModel)]="defaultExitAltitude" name="defaultExitAltitude">
<button mat-button *ngIf="defaultExitAltitude" matSuffix mat-icon-button aria-label="Clear"
(click)="defaultExitAltitude=''">
<mat-icon>close</mat-icon>
</button>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Deploy altitude" [(value)]="defaultDeployAltitude">
<input matInput placeholder="Deploy altitude" [(ngModel)]="defaultDeployAltitude" name="defaultDeployAltitude">
<button mat-button *ngIf="defaultDeployAltitude" matSuffix mat-icon-button aria-label="Clear"
(click)="defaultDeployAltitude=''">
<mat-icon>close</mat-icon>
@@ -54,7 +62,7 @@
<mat-form-field>
<input matInput placeholder="Count of jumps" [(ngModel)]="countOfJumps">
<input matInput placeholder="Count of jumps" [(ngModel)]="countOfJumps" name="countOfJumps">
<button mat-button *ngIf="countOfJumps" matSuffix mat-icon-button aria-label="Clear" (click)="countOfJumps=''">
<mat-icon>close</mat-icon>
</button>