BrainMinder/assets/templates/partials/message.tmpl

17 lines
473 B
Cheetah
Raw Normal View History

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-18 18:01:59 +01:00
<div class="{{ $messageClass }}">
2024-12-11 17:52:09 +01:00
<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 }}