camper/web/templates/admin/booking/checkin.gohtml

35 lines
1.2 KiB
Plaintext

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{( pgettext "Check-in Booking" "title" )}}
{{- end }}
{{ define "breadcrumb" -}}
<li><a href="./">{{( pgettext "Bookings" "title" )}}</a></li>
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/booking.checkinForm*/ -}}
<a href="/admin/bookings/{{ .Slug }}">{{( pgettext "Edit Booking" "action" )}}</a>
<h2>{{ template "title" .}}</h2>
<form method="post" action="/admin/bookings/{{ .Slug }}/check-in" id="checkin-guests">
{{ CSRFInput }}
<fieldset>
<legend>{{( pgettext "Guests" "title" )}}</legend>
{{ range .Guests -}}
{{ template "guest.gohtml" . }}
{{- end }}
</fieldset>
<footer>
<button type="submit">{{( pgettext "Check-in" "action" )}}</button>
<button type="button"
data-hx-get="/admin/bookings/{{ .Slug }}/guest"
data-hx-target="#checkin-guests > fieldset"
data-hx-swap="beforeend"
>{{( pgettext "Add another guest" "action" )}}</button>
</footer>
</form>
{{- end }}