Add the slug to the form in the campsite type public page
The idea is that the booking form will be prefilled with the values passed from that other mini-form, and the campsite type is implicit due to the page where the form is located at, but i need to give it to the booking page. The booking page does not yet use that information.
This commit is contained in:
parent
302ce29e4a
commit
048b7cbf90
|
@ -61,6 +61,7 @@ func (h *PublicHandler) Handler(user *auth.User, company *auth.Company, conn *da
|
|||
|
||||
type publicPage struct {
|
||||
*template.PublicPage
|
||||
Slug string
|
||||
Name string
|
||||
Carousel []*carousel.Slide
|
||||
Prices []*typePrice
|
||||
|
@ -101,6 +102,7 @@ func newPublicPage(ctx context.Context, company *auth.Company, conn *database.Co
|
|||
}
|
||||
page := &publicPage{
|
||||
PublicPage: template.NewPublicPage(),
|
||||
Slug: slug,
|
||||
Carousel: mustCollectSlides(ctx, conn, loc, slug),
|
||||
Calendar: calendar,
|
||||
Prices: prices,
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
<div class="campsite_type_booking">
|
||||
<form action="/{{ currentLocale }}/booking" method="get">
|
||||
<input type="hidden" name="type" value="{{ .Slug }}">
|
||||
<fieldset>
|
||||
<label>
|
||||
{{( pgettext "Check-in Date" "input")}}
|
||||
|
|
Loading…
Reference in New Issue