Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

693 B
Raw Blame
{{ define "list-selector" -}}
{{- $root := .Root -}}
{{- $model := .Model -}}
{{- $listID := .ListID -}}
{{- $disabled := .Disabled -}}
<div data-field>
	{{ if .Label }}<label for="{{ $listID }}">{{ $root.L.T .Label }}</label>{{ end }}
	<ot-taginput x-effect="$el.value = {{ $model }}.map((list) => listTagNode(list, true))" @input="{{ $model }} = $el.value.map((tag) => tag.item || tag)" {{ if $disabled }}:disabled="{{ $disabled }}"{{ end -}}>
		<input id="{{ $listID }}" aria-label="{{ $root.L.T .Placeholder }}" placeholder="{{ $root.L.T .Placeholder }}" x-init="listAutocomplete($el)" />
	</ot-taginput>
	<small data-hint>{{ $root.L.T "subscribers.listsHelp" }}</small>
</div>
{{- end }}