Skip to content

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

1.2 KB
Raw Blame
{{ define "manage-lists-form" -}}
{{- $root := .Root -}}
{{- $model := .Model -}}
{{- $id := .ListID -}}

<fieldset class="hstack">
	<legend>{{ $root.L.T "globals.fields.action" }}</legend>
	<label><input type="radio" name="{{ $id }}-action" value="add" x-model="{{ $model }}.action" data-testid="check-list-add" /> {{ $root.L.T "globals.buttons.add" }}</label>
	<label><input type="radio" name="{{ $id }}-action" value="remove" x-model="{{ $model }}.action" data-testid="check-list-remove" /> {{ $root.L.T "globals.buttons.remove" }}</label>
	<label><input type="radio" name="{{ $id }}-action" value="unsubscribe" x-model="{{ $model }}.action" data-testid="check-list-unsubscribe" /> {{ $root.L.T "subscribers.markUnsubscribed" }}</label>
</fieldset>
{{ template "list-selector" dict "Root" $root "Model" (printf "%s.lists" $model) "ListID" $id "Label" "globals.terms.lists" "Placeholder" "subscribers.listsPlaceholder" }}
<label data-field :aria-disabled="!{{ $model }}HasOptinList">
	<input type="checkbox" x-model="{{ $model }}.preconfirm" data-testid="preconfirm" :disabled="!{{ $model }}HasOptinList" /> {{ $root.L.T "subscribers.preconfirm" }}
	<small data-hint>{{ $root.L.T "subscribers.preconfirmHelp" }}</small>
</label>
{{- end }}