Correction sur le check de validation de formulaire

This commit is contained in:
2026-01-21 15:53:19 +01:00
parent 3baeb3066e
commit 7698754db2
4 changed files with 58 additions and 54 deletions

View File

@@ -46,7 +46,7 @@
aria-label="Clear"
(click)="selectedJumpType = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -78,7 +78,7 @@
aria-label="Clear"
(click)="selectedAircraft = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -104,9 +104,9 @@
aria-hidden="false"
aria-label="Favorite"
color="primary"
svgIcon="favorite"
>
favorite</mat-icon
>
</mat-icon>
}
</mat-option>
}
@@ -118,7 +118,7 @@
aria-label="Clear"
(click)="resetDz()"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -148,7 +148,7 @@
aria-label="Clear"
(click)="selectedGear = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -202,7 +202,7 @@
aria-label="Clear"
(click)="exitAltitude = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -221,7 +221,7 @@
aria-label="Clear"
(click)="deployAltitude = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -240,7 +240,7 @@
aria-label="Clear"
(click)="countOfJumps = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
@@ -259,12 +259,12 @@
aria-label="Clear"
(click)="comments = undefined"
>
<mat-icon>close</mat-icon>
<mat-icon svgIcon="close"></mat-icon>
</button>
}
</mat-form-field>
<br />
@if (isValidatedForm()) {
@if (this.isValidatedForm()) {
<button mat-raised-button color="accent">
{{ "NewJump_Submit" | translate }}
</button>

View File

@@ -125,6 +125,7 @@ export class NewJumpComponent implements OnInit {
}
onFormSubmit() {
if (this.isValidatedForm()) {
this.pendingAddRequest = true;
this.serviceJump
@@ -154,6 +155,7 @@ export class NewJumpComponent implements OnInit {
this.pendingAddRequest = false;
});
}
}
public isValidatedForm(): boolean {
return (

View File

@@ -141,7 +141,7 @@
}
</mat-form-field>
<br />
@if (isValidatedForm()) {
@if (this.isValidatedForm()) {
<button mat-raised-button color="accent">
{{ "NewTunnelFlight_Submit" | translate }}
</button>

View File

@@ -107,6 +107,7 @@ export class NewTunnelFlightComponent implements OnInit {
}
public onFormSubmit() {
if (this.isValidatedForm()) {
this.pendingAddRequest = true;
this.serviceTunnelFlight
@@ -126,6 +127,7 @@ export class NewTunnelFlightComponent implements OnInit {
this.pendingAddRequest = false;
});
}
}
public isValidatedForm(): boolean {
return (