2024-08-22 10:13:16 +02:00
|
|
|
{{define "message"}}
|
|
|
|
{{ if len .messageContent}}
|
|
|
|
{{ $messageClass := ""}}
|
|
|
|
{{if eq .messageType "success"}} {{ $messageClass = "alert-success"}}
|
|
|
|
{{else if eq .messageType "failure"}} {{ $messageClass = "alert-failure"}}
|
|
|
|
{{ end }}
|
2024-12-11 17:52:09 +01:00
|
|
|
<div _="init add .show to #message then wait 5s then remove .show from #message" class="hide {{ $messageClass }}">
|
|
|
|
<p><i class="bi bi-check-circle"></i> {{.messageContent}}</p>
|
2024-08-22 10:13:16 +02:00
|
|
|
<ul>
|
|
|
|
{{ range $field, $fieldMessage := .messageFieldErrors }}
|
|
|
|
<li>{{ $fieldMessage }}</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|