funky-framadate-front/src/app/features/shared/components/ui/form/errors-list/errors-list.component.html

38 lines
975 B
HTML
Raw Normal View History

2021-05-04 09:42:56 +02:00
<div
class="validation-error-list padded"
2021-11-30 17:37:23 +01:00
*ngIf="
(form.valid && !hide_on_valid && environment.display_validation_errors) ||
(environment.display_validation_errors && !form.valid)
"
2021-05-04 09:42:56 +02:00
[ngClass]="{ 'has-background-warning': totalErrors > 0, 'has-background-success': totalErrors === 0 }"
>
2021-05-04 09:33:28 +02:00
<h1 class="title is-1">
Validation
</h1>
2021-05-04 09:42:56 +02:00
<span class="status marged"> statut: {{ form.status }} </span>
<strong class="marged has-background-warning total-errors" *ngIf="form && totalErrors">
2021-05-04 09:33:28 +02:00
{{ totalErrors }} erreurs de validation
2021-05-04 09:42:56 +02:00
</strong>
<strong
class="marged has-background-warning total-errors fixed-hint clickable"
*ngIf="form && totalErrors && form.touched"
(click)="scrollToFirstError()"
>
2021-05-18 10:47:16 +02:00
{{ totalErrors }}
<i class="fa fa-warning"></i>
{{ firstErrorId }}
2021-05-18 10:47:16 +02:00
</strong>
2021-05-04 09:33:28 +02:00
<ul>
<li *ngFor="let m of messages">
{{ m }}
</li>
</ul>
2021-11-12 18:17:49 +01:00
<div class="debug" *ngIf="!environment.production">
<pre>
{{ messages | json }}
</pre
>
</div>
2021-05-04 09:33:28 +02:00
</div>