Move down HTMx attributes for booking form
Otherwise, it reloads the form while customers are writing their details, removing the focus from the form; **very** annoying. On the plus side, there is nothing to compute when entering these fields, thus no redundant work is done now.
This commit is contained in:
parent
95ae50c1c3
commit
0f76351ae9
|
@ -5,13 +5,12 @@
|
||||||
-->
|
-->
|
||||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/booking.publicPage*/ -}}
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/booking.publicPage*/ -}}
|
||||||
{{ with .Form -}}
|
{{ with .Form -}}
|
||||||
<fieldset
|
<fieldset>
|
||||||
data-hx-get="/{{ currentLocale }}/booking"
|
|
||||||
data-hx-trigger="change"
|
|
||||||
>
|
|
||||||
<input type="hidden" name="{{ .PaymentSlug.Name }}" value="{{ .PaymentSlug.Val }}">
|
<input type="hidden" name="{{ .PaymentSlug.Name }}" value="{{ .PaymentSlug.Val }}">
|
||||||
|
|
||||||
<fieldset class="accommodation">
|
<fieldset class="accommodation"
|
||||||
|
data-hx-get="/{{ currentLocale }}/booking" data-hx-trigger="change"
|
||||||
|
>
|
||||||
<legend>{{( pgettext "Accommodation" "title" )}}</legend>
|
<legend>{{( pgettext "Accommodation" "title" )}}</legend>
|
||||||
{{ range .CampsiteType.Options -}}
|
{{ range .CampsiteType.Options -}}
|
||||||
<label><input type="radio" name="{{ $.Form.CampsiteType.Name }}" value="{{ .Value }}"
|
<label><input type="radio" name="{{ $.Form.CampsiteType.Name }}" value="{{ .Value }}"
|
||||||
|
@ -21,7 +20,9 @@
|
||||||
{{ template "error-message" .CampsiteType }}
|
{{ template "error-message" .CampsiteType }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{ with .Dates -}}
|
{{ with .Dates -}}
|
||||||
<fieldset class="booking-period">
|
<fieldset class="booking-period"
|
||||||
|
data-hx-get="/{{ currentLocale }}/booking" data-hx-trigger="change"
|
||||||
|
>
|
||||||
<legend>{{( pgettext "Booking Period" "title" )}}</legend>
|
<legend>{{( pgettext "Booking Period" "title" )}}</legend>
|
||||||
{{ with .ArrivalDate -}}
|
{{ with .ArrivalDate -}}
|
||||||
<label>
|
<label>
|
||||||
|
@ -48,7 +49,9 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ with $guests := .Guests -}}
|
{{ with $guests := .Guests -}}
|
||||||
<fieldset class="guests campsite-options">
|
<fieldset class="guests campsite-options"
|
||||||
|
data-hx-get="/{{ currentLocale }}/booking" data-hx-trigger="change"
|
||||||
|
>
|
||||||
<legend>{{( pgettext "Guests" "title" )}}</legend>
|
<legend>{{( pgettext "Guests" "title" )}}</legend>
|
||||||
|
|
||||||
{{ with .NumberAdults -}}
|
{{ with .NumberAdults -}}
|
||||||
|
@ -107,7 +110,9 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ with .Options -}}
|
{{ with .Options -}}
|
||||||
<fieldset class="campsite-options">
|
<fieldset class="campsite-options"
|
||||||
|
data-hx-get="/{{ currentLocale }}/booking" data-hx-trigger="change"
|
||||||
|
>
|
||||||
<legend>{{ .Legend }}</legend>
|
<legend>{{ .Legend }}</legend>
|
||||||
{{ with .ZonePreferences -}}
|
{{ with .ZonePreferences -}}
|
||||||
<label>
|
<label>
|
||||||
|
|
Loading…
Reference in New Issue