2023-10-12 14:33:45 +00:00
|
|
|
<!--
|
|
|
|
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/campsite/types.slideForm*/ -}}
|
|
|
|
{{ if .MediaID }}
|
|
|
|
{{( pgettext "Edit Campsite Type Carousel Slide" "title" )}}
|
|
|
|
{{ else }}
|
|
|
|
{{( pgettext "New Campsite Type Carousel Slide" "title" )}}
|
|
|
|
{{ end }}
|
|
|
|
{{- end }}
|
|
|
|
|
2024-01-21 21:44:04 +00:00
|
|
|
{{ define "breadcrumb" -}}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.slideForm*/ -}}
|
|
|
|
<li><a href="/admin/campsites">{{( pgettext "Campsites" "title" )}}</a></li>
|
|
|
|
<li><a href="/admin/campsites/types">{{( pgettext "Campsite Types" "title" )}}</a></li>
|
|
|
|
<li><a href="/admin/campsites/types/{{ .TypeSlug }}/slides">{{( pgettext "Campsite Type Carousel" "title" )}}</a></li>
|
|
|
|
{{- end }}
|
|
|
|
|
2023-10-12 14:33:45 +00:00
|
|
|
{{ define "content" -}}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.slideForm*/ -}}
|
|
|
|
<form
|
|
|
|
{{ if .MediaID }}
|
|
|
|
data-hx-put="/admin/campsites/types/{{ .TypeSlug }}/slides/{{ .MediaID }}"
|
|
|
|
{{ else }}
|
|
|
|
action="/admin/campsites/types/{{ .TypeSlug }}/slides" method="post"
|
|
|
|
{{ end }}
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
{{ if .MediaID }}
|
|
|
|
{{( pgettext "Edit Campsite Type Carousel Slide" "title" )}}
|
|
|
|
{{ else }}
|
|
|
|
{{( pgettext "New Campsite Type Carousel Slide" "title" )}}
|
|
|
|
{{ end }}
|
|
|
|
</h2>
|
|
|
|
{{ CSRFInput }}
|
2024-01-12 18:51:12 +00:00
|
|
|
<fieldset {{ template "init-lang" . }}>
|
2023-10-12 14:33:45 +00:00
|
|
|
{{ with .Media -}}
|
|
|
|
{{ template "media-picker" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Caption -}}
|
2024-01-10 20:52:49 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend>{{( pgettext "Caption" "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>
|
2023-10-12 14:33:45 +00:00
|
|
|
{{- end }}
|
|
|
|
</fieldset>
|
|
|
|
<footer>
|
|
|
|
<button type="submit">
|
|
|
|
{{ if .MediaID }}
|
|
|
|
{{( pgettext "Update" "action" )}}
|
|
|
|
{{ else }}
|
|
|
|
{{( pgettext "Add" "action" )}}
|
|
|
|
{{ end }}
|
|
|
|
</button>
|
|
|
|
</footer>
|
|
|
|
</form>
|
|
|
|
{{- end }}
|