Keep campsite type and date when going to booking form from type page
This commit is contained in:
parent
ded10ded08
commit
20d32d6a6d
|
@ -38,6 +38,7 @@ func (h *PublicHandler) Handler(user *auth.User, company *auth.Company, conn *da
|
|||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
page := newPublicPage(r.Context(), company, conn, user.Locale)
|
||||
_ = page.Form.Parse(r) // Get query parameters, if any
|
||||
page.MustRender(w, r, user, company, conn)
|
||||
case http.MethodPost:
|
||||
makeReservation(w, r, user, company, conn)
|
||||
|
|
|
@ -35,18 +35,18 @@
|
|||
|
||||
<div class="campsite_type_booking">
|
||||
<form action="/{{ currentLocale }}/booking" method="get">
|
||||
<input type="hidden" name="type" value="{{ .Slug }}">
|
||||
<input type="hidden" name="campsite_type" value="{{ .Slug }}">
|
||||
<fieldset>
|
||||
<label>
|
||||
{{( pgettext "Check-in Date" "input")}}
|
||||
<br>
|
||||
<input name="checkin_date" type="date" required>
|
||||
<input name="arrival_date" type="date" required>
|
||||
<br>
|
||||
</label>
|
||||
<label>
|
||||
{{( pgettext "Check-out Date" "input")}}
|
||||
<br>
|
||||
<input name="checkout_date" type="date" required>
|
||||
<input name="departure_date" type="date" required>
|
||||
<br>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
|
Loading…
Reference in New Issue