55 lines
1.8 KiB
Plaintext
55 lines
1.8 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/campsite/types.slideForm*/ -}}
|
||
|
{{ if .MediaID }}
|
||
|
{{( pgettext "Edit Campsite Type Carousel Slide" "title" )}}
|
||
|
{{ else }}
|
||
|
{{( pgettext "New Campsite Type Carousel Slide" "title" )}}
|
||
|
{{ end }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{ 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 }}
|
||
|
<fieldset>
|
||
|
{{ with .Media -}}
|
||
|
{{ template "media-picker" . }}
|
||
|
{{- end }}
|
||
|
{{ with .Caption -}}
|
||
|
<label>
|
||
|
{{( pgettext "Caption" "input")}}<br>
|
||
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
||
|
{{ template "error-attrs" . }}><br>
|
||
|
</label>
|
||
|
{{ template "error-message" . }}
|
||
|
{{- end }}
|
||
|
</fieldset>
|
||
|
<footer>
|
||
|
<button type="submit">
|
||
|
{{ if .MediaID }}
|
||
|
{{( pgettext "Update" "action" )}}
|
||
|
{{ else }}
|
||
|
{{( pgettext "Add" "action" )}}
|
||
|
{{ end }}
|
||
|
</button>
|
||
|
</footer>
|
||
|
</form>
|
||
|
{{- end }}
|