73 lines
2.7 KiB
Plaintext
73 lines
2.7 KiB
Plaintext
<!--
|
|
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
{{ define "title" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/carousel.slideForm*/ -}}
|
|
{{ if .ID}}
|
|
{{( pgettext "Edit Highlight" "title" )}}
|
|
{{ else }}
|
|
{{( pgettext "New Highlight" "title" )}}
|
|
{{ end }}
|
|
{{- end }}
|
|
|
|
{{ define "content" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/surroundings.highlightForm*/ -}}
|
|
<form
|
|
{{ if .ID }}
|
|
data-hx-put="/admin/surroundings/{{ .ID }}"
|
|
{{ else }}
|
|
action="/admin/surroundings" method="post"
|
|
{{ end }}
|
|
>
|
|
<h2>
|
|
{{ if .ID }}
|
|
{{( pgettext "Edit Highlight" "title" )}}
|
|
{{ else }}
|
|
{{( pgettext "New Highlight" "title" )}}
|
|
{{ end }}
|
|
</h2>
|
|
{{ CSRFInput }}
|
|
<fieldset {{ template "init-lang" . }}>
|
|
{{ with .Media -}}
|
|
{{ template "media-picker" . }}
|
|
{{- end }}
|
|
{{ with .Name -}}
|
|
<fieldset>
|
|
<legend>{{( pgettext "Name" "input")}}</legend>
|
|
{{ template "lang-selector" . }}
|
|
{{ range $lang, $input := . -}}
|
|
<label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br>
|
|
<input type="text" name="{{ $input.Name }}" value="{{ $input.Val }}"
|
|
{{ template "error-attrs" . }}><br>
|
|
</label>
|
|
{{- end }}
|
|
{{ template "error-message" . }}
|
|
</fieldset>
|
|
{{- end }}
|
|
{{ with .Description -}}
|
|
<fieldset>
|
|
<legend>{{( pgettext "Description" "input")}}</legend>
|
|
{{ template "lang-selector" . }}
|
|
{{ range $lang, $input := . -}}
|
|
<label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br>
|
|
<textarea class="html"
|
|
name="{{ $input.Name }}" {{ template "error-attrs" $input }}>{{ $input.Val }}</textarea><br>
|
|
</label>
|
|
{{- end }}
|
|
{{ template "error-message" . }}
|
|
</fieldset>
|
|
{{- end }}
|
|
</fieldset>
|
|
<footer>
|
|
<button type="submit">
|
|
{{ if .ID }}
|
|
{{( pgettext "Update" "action" )}}
|
|
{{ else }}
|
|
{{( pgettext "Add" "action" )}}
|
|
{{ end }}
|
|
</button>
|
|
</footer>
|
|
</form>
|
|
{{- end }}
|