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

38 lines
975 B
HTML

<div
class="validation-error-list padded"
*ngIf="
(form.valid && !hide_on_valid && environment.display_validation_errors) ||
(environment.display_validation_errors && !form.valid)
"
[ngClass]="{ 'has-background-warning': totalErrors > 0, 'has-background-success': totalErrors === 0 }"
>
<h1 class="title is-1">
Validation
</h1>
<span class="status marged"> statut: {{ form.status }} </span>
<strong class="marged has-background-warning total-errors" *ngIf="form && totalErrors">
{{ totalErrors }} erreurs de validation
</strong>
<strong
class="marged has-background-warning total-errors fixed-hint clickable"
*ngIf="form && totalErrors && form.touched"
(click)="scrollToFirstError()"
>
{{ totalErrors }}
<i class="fa fa-warning"></i>
{{ firstErrorId }}
</strong>
<ul>
<li *ngFor="let m of messages">
{{ m }}
</li>
</ul>
<div class="debug" *ngIf="!environment.production">
<pre>
{{ messages | json }}
</pre
>
</div>
</div>