diff --git a/pkg/booking/public.go b/pkg/booking/public.go index f50a5bc..e03840a 100644 --- a/pkg/booking/public.go +++ b/pkg/booking/public.go @@ -128,10 +128,6 @@ type bookingForm struct { Country *form.Select Email *form.Input Phone *form.Input - Adults *form.Input - Teenagers *form.Input - Children *form.Input - Dogs *form.Input CampsiteType *form.Select CampsiteTypeOptions map[string][]*campsiteTypeOption ArrivalDate *form.Input @@ -172,22 +168,6 @@ func newBookingForm(ctx context.Context, company *auth.Company, conn *database.C Phone: &form.Input{ Name: "phone", }, - Adults: &form.Input{ - Name: "adults", - Val: "2", - }, - Teenagers: &form.Input{ - Name: "teenagers", - Val: "0", - }, - Children: &form.Input{ - Name: "children", - Val: "0", - }, - Dogs: &form.Input{ - Name: "dogs", - Val: "0", - }, CampsiteType: &form.Select{ Name: "campsite_type", Options: form.MustGetOptions(ctx, conn, "select type.slug, coalesce(i18n.name, type.name) as l10n_name from campsite_type as type left join campsite_type_i18n as i18n on type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1 where company_id = $2 order by l10n_name", l.Language, company.ID), @@ -250,10 +230,6 @@ func (f *bookingForm) Parse(r *http.Request) error { f.Country.FillValue(r) f.Email.FillValue(r) f.Phone.FillValue(r) - f.Adults.FillValue(r) - f.Teenagers.FillValue(r) - f.Children.FillValue(r) - f.Dogs.FillValue(r) f.CampsiteType.FillValue(r) f.ArrivalDate.FillValue(r) f.DepartureDate.FillValue(r) @@ -293,26 +269,6 @@ func (f *bookingForm) Valid(ctx context.Context, conn *database.Conn, l *locale. return false, err } } - if v.CheckRequired(f.Adults, l.GettextNoop("Number of adults can not be empty")) { - if v.CheckValidInteger(f.Adults, l.GettextNoop("Number of adults must be an integer.")) { - v.CheckMinInteger(f.Adults, 1, l.GettextNoop("Number of adults must be one or greater.")) - } - } - if v.CheckRequired(f.Teenagers, l.GettextNoop("Number of teenagers can not be empty")) { - if v.CheckValidInteger(f.Teenagers, l.GettextNoop("Number of teenagers must be an integer.")) { - v.CheckMinInteger(f.Teenagers, 0, l.GettextNoop("Number of teenagers must be zero or greater.")) - } - } - if v.CheckRequired(f.Children, l.GettextNoop("Number of children can not be empty")) { - if v.CheckValidInteger(f.Children, l.GettextNoop("Number of children must be an integer.")) { - v.CheckMinInteger(f.Children, 0, l.GettextNoop("Number of children must be zero or greater.")) - } - } - if v.CheckRequired(f.Dogs, l.GettextNoop("Number of dogs can not be empty")) { - if v.CheckValidInteger(f.Dogs, l.GettextNoop("Number of dogs must be an integer.")) { - v.CheckMinInteger(f.Dogs, 0, l.GettextNoop("Number of dogs must be zero or greater.")) - } - } var validBefore bool v.CheckSelectedOptions(f.CampsiteType, l.GettextNoop("Selected campsite type is not valid.")) if v.CheckRequired(f.ArrivalDate, l.GettextNoop("Arrival date can not be empty")) { diff --git a/po/ca.po b/po/ca.po index fd54d15..b3fb674 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2023-10-27 15:59+0200\n" +"POT-Creation-Date: 2023-12-12 23:14+0100\n" "PO-Revision-Date: 2023-07-22 23:45+0200\n" "Last-Translator: jordi fita mas \n" "Language-Team: Catalan \n" @@ -30,7 +30,7 @@ msgctxt "title" msgid "Payment" msgstr "Pagament" -#: web/templates/public/payment/request.gohtml:17 +#: web/templates/public/payment/request.gohtml:23 msgctxt "action" msgid "Pay" msgstr "Paga" @@ -111,7 +111,7 @@ msgid "Check-out Date" msgstr "Data de sortida" #: web/templates/public/campsite/type.gohtml:54 -#: web/templates/public/booking.gohtml:194 +#: web/templates/public/booking.gohtml:155 msgctxt "action" msgid "Book" msgstr "Reserva" @@ -329,60 +329,35 @@ msgstr "Telèfon" #: web/templates/public/booking.gohtml:83 msgctxt "title" -msgid "Party Details" -msgstr "Dades dels visitants" - -#: web/templates/public/booking.gohtml:86 -msgctxt "input" -msgid "Adults" -msgstr "Adults" - -#: web/templates/public/booking.gohtml:95 -msgctxt "input" -msgid "Teenagers (from 11 to 16 years old)" -msgstr "Adolescents (entre 11 i 16 anys)" - -#: web/templates/public/booking.gohtml:104 -msgctxt "input" -msgid "Children (up to 10 years old)" -msgstr "Nens (fins a 10 anys)" - -#: web/templates/public/booking.gohtml:113 -msgctxt "input" -msgid "Dogs" -msgstr "Gossos" - -#: web/templates/public/booking.gohtml:122 -msgctxt "title" msgid "Accomodation" msgstr "Acomodacions" -#: web/templates/public/booking.gohtml:150 -msgctxt "title" -msgid "Booking Period" -msgstr "Període de reserva" - -#: web/templates/public/booking.gohtml:153 -msgctxt "input" -msgid "Arrival date" -msgstr "Data d’arribada" - -#: web/templates/public/booking.gohtml:162 -msgctxt "input" -msgid "Departure date" -msgstr "Data de sortida" - -#: web/templates/public/booking.gohtml:171 +#: web/templates/public/booking.gohtml:98 msgctxt "input" msgid "Area preferences (optional)" msgstr "Preferències d’àrea (opcional)" -#: web/templates/public/booking.gohtml:182 +#: web/templates/public/booking.gohtml:120 +msgctxt "title" +msgid "Booking Period" +msgstr "Període de reserva" + +#: web/templates/public/booking.gohtml:123 +msgctxt "input" +msgid "Arrival date" +msgstr "Data d’arribada" + +#: web/templates/public/booking.gohtml:132 +msgctxt "input" +msgid "Departure date" +msgstr "Data de sortida" + +#: web/templates/public/booking.gohtml:143 msgctxt "input" msgid "ACSI card? (optional)" msgstr "Targeta ACSI? (opcional)" -#: web/templates/public/booking.gohtml:189 +#: web/templates/public/booking.gohtml:150 msgctxt "input" msgid "I have read and I accept the reservation conditions" msgstr "He llegit i accepto les condicions de reserves" @@ -1247,12 +1222,12 @@ msgid "Slide image must be an image media type." msgstr "La imatge de la diapositiva ha de ser un mèdia de tipus imatge." #: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:210 -#: pkg/booking/public.go:288 +#: pkg/booking/public.go:264 msgid "Email can not be empty." msgstr "No podeu deixar el correu-e en blanc." #: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:211 -#: pkg/booking/public.go:289 +#: pkg/booking/public.go:265 msgid "This email is not valid. It should be like name@domain.com." msgstr "Aquest correu-e no és vàlid. Hauria de ser similar a nom@domini.com." @@ -1385,7 +1360,7 @@ msgctxt "season" msgid "Closed" msgstr "Tancat" -#: pkg/campsite/admin.go:226 pkg/booking/public.go:317 +#: pkg/campsite/admin.go:226 pkg/booking/public.go:273 msgid "Selected campsite type is not valid." msgstr "El tipus d’allotjament escollit no és vàlid." @@ -1482,7 +1457,7 @@ msgstr "No podeu deixar la data de fi en blanc." msgid "End date must be a valid date." msgstr "La data de fi ha de ser una data vàlida." -#: pkg/company/admin.go:193 pkg/booking/public.go:275 +#: pkg/company/admin.go:193 pkg/booking/public.go:251 msgid "Selected country is not valid." msgstr "El país escollit no és vàlid." @@ -1502,11 +1477,11 @@ msgstr "No podeu deixar el NIF en blanc." msgid "This VAT number is not valid." msgstr "Aquest NIF no és vàlid." -#: pkg/company/admin.go:205 pkg/booking/public.go:291 +#: pkg/company/admin.go:205 pkg/booking/public.go:267 msgid "Phone can not be empty." msgstr "No podeu deixar el telèfon en blanc." -#: pkg/company/admin.go:206 pkg/booking/public.go:292 +#: pkg/company/admin.go:206 pkg/booking/public.go:268 msgid "This phone number is not valid." msgstr "Aquest número de telèfon no és vàlid." @@ -1530,7 +1505,7 @@ msgstr "No podeu deixar la província en blanc." msgid "Postal code can not be empty." msgstr "No podeu deixar el codi postal en blanc." -#: pkg/company/admin.go:220 pkg/booking/public.go:284 +#: pkg/company/admin.go:220 pkg/booking/public.go:260 msgid "This postal code is not valid." msgstr "Aquest codi postal no és vàlid." @@ -1610,106 +1585,114 @@ msgstr "La integració escollida no és vàlida." msgid "The merchant key is not valid." msgstr "Aquesta clau del comerç no és vàlid." -#: pkg/booking/public.go:279 +#: pkg/booking/public.go:255 msgid "Full name can not be empty." msgstr "No podeu deixar el nom i els cognoms en blanc." -#: pkg/booking/public.go:280 +#: pkg/booking/public.go:256 msgid "Full name must have at least one letter." msgstr "El nom i els cognoms han de tenir com a mínim una lletra." -#: pkg/booking/public.go:296 -msgid "Number of adults can not be empty" -msgstr "No podeu deixar el número d’adults en blanc." - -#: pkg/booking/public.go:297 -msgid "Number of adults must be an integer." -msgstr "El número d’adults ha de ser enter." - -#: pkg/booking/public.go:298 -msgid "Number of adults must be one or greater." -msgstr "El número d’adults no pot ser zero." - -#: pkg/booking/public.go:301 -msgid "Number of teenagers can not be empty" -msgstr "No podeu deixar el número d’adolescents en blanc." - -#: pkg/booking/public.go:302 -msgid "Number of teenagers must be an integer." -msgstr "El número d’adolescents ha de ser enter." - -#: pkg/booking/public.go:303 -msgid "Number of teenagers must be zero or greater." -msgstr "El número d’adolescents ha de ser com a mínim zero." - -#: pkg/booking/public.go:306 -msgid "Number of children can not be empty" -msgstr "No podeu deixar el número de nens en blanc." - -#: pkg/booking/public.go:307 -msgid "Number of children must be an integer." -msgstr "El número de nens ha de ser enter." - -#: pkg/booking/public.go:308 -msgid "Number of children must be zero or greater." -msgstr "El número de nens ha de ser com a mínim zero." - -#: pkg/booking/public.go:311 -msgid "Number of dogs can not be empty" -msgstr "No podeu deixar el número de gossos en blanc." - -#: pkg/booking/public.go:312 -msgid "Number of dogs must be an integer." -msgstr "El número de gossos ha de ser enter." - -#: pkg/booking/public.go:313 -msgid "Number of dogs must be zero or greater." -msgstr "El número de gossos ha de ser com a mínim zero." - -#: pkg/booking/public.go:318 +#: pkg/booking/public.go:274 msgid "Arrival date can not be empty" msgstr "No podeu deixar la data d’arribada en blanc." -#: pkg/booking/public.go:319 +#: pkg/booking/public.go:275 msgid "Arrival date must be a valid date." msgstr "La data d’arribada ha de ser una data vàlida." -#: pkg/booking/public.go:323 +#: pkg/booking/public.go:279 msgid "Departure date can not be empty" msgstr "No podeu deixar la data de sortida en blanc." -#: pkg/booking/public.go:324 +#: pkg/booking/public.go:280 msgid "Departure date must be a valid date." msgstr "La data de sortida ha de ser una data vàlida." -#: pkg/booking/public.go:325 +#: pkg/booking/public.go:281 msgid "The departure date must be after the arrival date." msgstr "La data de sortida ha de ser posterior a la d’arribada." -#: pkg/booking/public.go:328 +#: pkg/booking/public.go:284 msgid "It is mandatory to agree to the reservation conditions." msgstr "És obligatori acceptar les condicions de reserves." -#: pkg/booking/public.go:331 +#: pkg/booking/public.go:287 #, c-format msgid "%s can not be empty" msgstr "No podeu deixar %s en blanc." -#: pkg/booking/public.go:332 +#: pkg/booking/public.go:288 #, c-format msgid "%s must be an integer." msgstr "%s ha de ser un número enter." -#: pkg/booking/public.go:333 +#: pkg/booking/public.go:289 #, c-format msgid "%s must be %d or greater." msgstr "El valor de %s ha de ser com a mínim %d." -#: pkg/booking/public.go:334 +#: pkg/booking/public.go:290 #, c-format msgid "%s must be at most %d." msgstr "El valor de %s ha de ser com a màxim %d." +#~ msgctxt "title" +#~ msgid "Party Details" +#~ msgstr "Dades dels visitants" + +#~ msgctxt "input" +#~ msgid "Adults" +#~ msgstr "Adults" + +#~ msgctxt "input" +#~ msgid "Teenagers (from 11 to 16 years old)" +#~ msgstr "Adolescents (entre 11 i 16 anys)" + +#~ msgctxt "input" +#~ msgid "Children (up to 10 years old)" +#~ msgstr "Nens (fins a 10 anys)" + +#~ msgctxt "input" +#~ msgid "Dogs" +#~ msgstr "Gossos" + +#~ msgid "Number of adults can not be empty" +#~ msgstr "No podeu deixar el número d’adults en blanc." + +#~ msgid "Number of adults must be an integer." +#~ msgstr "El número d’adults ha de ser enter." + +#~ msgid "Number of adults must be one or greater." +#~ msgstr "El número d’adults no pot ser zero." + +#~ msgid "Number of teenagers can not be empty" +#~ msgstr "No podeu deixar el número d’adolescents en blanc." + +#~ msgid "Number of teenagers must be an integer." +#~ msgstr "El número d’adolescents ha de ser enter." + +#~ msgid "Number of teenagers must be zero or greater." +#~ msgstr "El número d’adolescents ha de ser com a mínim zero." + +#~ msgid "Number of children can not be empty" +#~ msgstr "No podeu deixar el número de nens en blanc." + +#~ msgid "Number of children must be an integer." +#~ msgstr "El número de nens ha de ser enter." + +#~ msgid "Number of children must be zero or greater." +#~ msgstr "El número de nens ha de ser com a mínim zero." + +#~ msgid "Number of dogs can not be empty" +#~ msgstr "No podeu deixar el número de gossos en blanc." + +#~ msgid "Number of dogs must be an integer." +#~ msgstr "El número de gossos ha de ser enter." + +#~ msgid "Number of dogs must be zero or greater." +#~ msgstr "El número de gossos ha de ser com a mínim zero." + #~ msgid "%s: %s €/night" #~ msgstr "%s: %s €/nit" diff --git a/po/es.po b/po/es.po index 4e95f41..0065f2b 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2023-10-27 15:59+0200\n" +"POT-Creation-Date: 2023-12-12 23:14+0100\n" "PO-Revision-Date: 2023-07-22 23:46+0200\n" "Last-Translator: jordi fita mas \n" "Language-Team: Spanish \n" @@ -30,7 +30,7 @@ msgctxt "title" msgid "Payment" msgstr "Pago" -#: web/templates/public/payment/request.gohtml:17 +#: web/templates/public/payment/request.gohtml:23 msgctxt "action" msgid "Pay" msgstr "Pagar" @@ -111,7 +111,7 @@ msgid "Check-out Date" msgstr "Fecha de salida" #: web/templates/public/campsite/type.gohtml:54 -#: web/templates/public/booking.gohtml:194 +#: web/templates/public/booking.gohtml:155 msgctxt "action" msgid "Book" msgstr "Reservar" @@ -329,60 +329,35 @@ msgstr "Teléfono" #: web/templates/public/booking.gohtml:83 msgctxt "title" -msgid "Party Details" -msgstr "Datos de los visitantes" - -#: web/templates/public/booking.gohtml:86 -msgctxt "input" -msgid "Adults" -msgstr "Adultos" - -#: web/templates/public/booking.gohtml:95 -msgctxt "input" -msgid "Teenagers (from 11 to 16 years old)" -msgstr "Adolescentes (de 11 a 16 años)" - -#: web/templates/public/booking.gohtml:104 -msgctxt "input" -msgid "Children (up to 10 years old)" -msgstr "Niños (hasta 10 años)" - -#: web/templates/public/booking.gohtml:113 -msgctxt "input" -msgid "Dogs" -msgstr "Perros" - -#: web/templates/public/booking.gohtml:122 -msgctxt "title" msgid "Accomodation" msgstr "Acomodaciones" -#: web/templates/public/booking.gohtml:150 -msgctxt "title" -msgid "Booking Period" -msgstr "Periodo de reserva" - -#: web/templates/public/booking.gohtml:153 -msgctxt "input" -msgid "Arrival date" -msgstr "Fecha de llegada" - -#: web/templates/public/booking.gohtml:162 -msgctxt "input" -msgid "Departure date" -msgstr "Fecha de salida" - -#: web/templates/public/booking.gohtml:171 +#: web/templates/public/booking.gohtml:98 msgctxt "input" msgid "Area preferences (optional)" msgstr "Preferencias de área (opcional)" -#: web/templates/public/booking.gohtml:182 +#: web/templates/public/booking.gohtml:120 +msgctxt "title" +msgid "Booking Period" +msgstr "Periodo de reserva" + +#: web/templates/public/booking.gohtml:123 +msgctxt "input" +msgid "Arrival date" +msgstr "Fecha de llegada" + +#: web/templates/public/booking.gohtml:132 +msgctxt "input" +msgid "Departure date" +msgstr "Fecha de salida" + +#: web/templates/public/booking.gohtml:143 msgctxt "input" msgid "ACSI card? (optional)" msgstr "¿Tarjeta ACSI? (opcional)" -#: web/templates/public/booking.gohtml:189 +#: web/templates/public/booking.gohtml:150 msgctxt "input" msgid "I have read and I accept the reservation conditions" msgstr "He leído y acepto las condiciones de reserva" @@ -1247,12 +1222,12 @@ msgid "Slide image must be an image media type." msgstr "La imagen de la diapositiva tiene que ser un medio de tipo imagen." #: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:210 -#: pkg/booking/public.go:288 +#: pkg/booking/public.go:264 msgid "Email can not be empty." msgstr "No podéis dejar el correo-e en blanco." #: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:211 -#: pkg/booking/public.go:289 +#: pkg/booking/public.go:265 msgid "This email is not valid. It should be like name@domain.com." msgstr "Este correo-e no es válido. Tiene que ser parecido a nombre@dominio.com." @@ -1385,7 +1360,7 @@ msgctxt "season" msgid "Closed" msgstr "Cerrado" -#: pkg/campsite/admin.go:226 pkg/booking/public.go:317 +#: pkg/campsite/admin.go:226 pkg/booking/public.go:273 msgid "Selected campsite type is not valid." msgstr "El tipo de alojamiento escogido no es válido." @@ -1482,7 +1457,7 @@ msgstr "No podéis dejar la fecha final en blanco." msgid "End date must be a valid date." msgstr "La fecha final tiene que ser una fecha válida." -#: pkg/company/admin.go:193 pkg/booking/public.go:275 +#: pkg/company/admin.go:193 pkg/booking/public.go:251 msgid "Selected country is not valid." msgstr "El país escogido no es válido." @@ -1502,11 +1477,11 @@ msgstr "No podéis dejar el NIF en blanco." msgid "This VAT number is not valid." msgstr "Este NIF no es válido." -#: pkg/company/admin.go:205 pkg/booking/public.go:291 +#: pkg/company/admin.go:205 pkg/booking/public.go:267 msgid "Phone can not be empty." msgstr "No podéis dejar el teléfono en blanco." -#: pkg/company/admin.go:206 pkg/booking/public.go:292 +#: pkg/company/admin.go:206 pkg/booking/public.go:268 msgid "This phone number is not valid." msgstr "Este teléfono no es válido." @@ -1530,7 +1505,7 @@ msgstr "No podéis dejar la provincia en blanco." msgid "Postal code can not be empty." msgstr "No podéis dejar el código postal en blanco." -#: pkg/company/admin.go:220 pkg/booking/public.go:284 +#: pkg/company/admin.go:220 pkg/booking/public.go:260 msgid "This postal code is not valid." msgstr "Este código postal no es válido." @@ -1610,106 +1585,114 @@ msgstr "La integración escogida no es válida." msgid "The merchant key is not valid." msgstr "Esta clave del comercio no es válida." -#: pkg/booking/public.go:279 +#: pkg/booking/public.go:255 msgid "Full name can not be empty." msgstr "No podéis dejar el nombre y los apellidos en blanco." -#: pkg/booking/public.go:280 +#: pkg/booking/public.go:256 msgid "Full name must have at least one letter." msgstr "El nombre y los apellidos tienen que tener como mínimo una letra." -#: pkg/booking/public.go:296 -msgid "Number of adults can not be empty" -msgstr "No podéis dejar el número de adultos blanco." - -#: pkg/booking/public.go:297 -msgid "Number of adults must be an integer." -msgstr "El número de adultos tiene que ser entero." - -#: pkg/booking/public.go:298 -msgid "Number of adults must be one or greater." -msgstr "El número de adultos no puede ser cero." - -#: pkg/booking/public.go:301 -msgid "Number of teenagers can not be empty" -msgstr "No podéis dejar el número de adolescentes en blanco." - -#: pkg/booking/public.go:302 -msgid "Number of teenagers must be an integer." -msgstr "El número de adolescentes tiene que ser entero." - -#: pkg/booking/public.go:303 -msgid "Number of teenagers must be zero or greater." -msgstr "El número de adolescentes tiene que ser como mínimo cero." - -#: pkg/booking/public.go:306 -msgid "Number of children can not be empty" -msgstr "No podéis dejar el número de niños en blanco." - -#: pkg/booking/public.go:307 -msgid "Number of children must be an integer." -msgstr "El número de niños tiene que ser entero." - -#: pkg/booking/public.go:308 -msgid "Number of children must be zero or greater." -msgstr "El número de niños tiene que ser como mínimo cero." - -#: pkg/booking/public.go:311 -msgid "Number of dogs can not be empty" -msgstr "No podéis dejar el número de perros en blanco." - -#: pkg/booking/public.go:312 -msgid "Number of dogs must be an integer." -msgstr "El número de perros tiene que ser entero." - -#: pkg/booking/public.go:313 -msgid "Number of dogs must be zero or greater." -msgstr "El número de perros tiene que ser como mínimo cero." - -#: pkg/booking/public.go:318 +#: pkg/booking/public.go:274 msgid "Arrival date can not be empty" msgstr "No podéis dejar la fecha de llegada en blanco." -#: pkg/booking/public.go:319 +#: pkg/booking/public.go:275 msgid "Arrival date must be a valid date." msgstr "La fecha de llegada tiene que ser una fecha válida." -#: pkg/booking/public.go:323 +#: pkg/booking/public.go:279 msgid "Departure date can not be empty" msgstr "No podéis dejar la fecha de partida en blanco." -#: pkg/booking/public.go:324 +#: pkg/booking/public.go:280 msgid "Departure date must be a valid date." msgstr "La fecha de partida tiene que ser una fecha válida." -#: pkg/booking/public.go:325 +#: pkg/booking/public.go:281 msgid "The departure date must be after the arrival date." msgstr "La fecha de partida tiene que ser posterior a la de llegada." -#: pkg/booking/public.go:328 +#: pkg/booking/public.go:284 msgid "It is mandatory to agree to the reservation conditions." msgstr "Es obligatorio aceptar las condiciones de reserva." -#: pkg/booking/public.go:331 +#: pkg/booking/public.go:287 #, c-format msgid "%s can not be empty" msgstr "No podéis dejar %s en blanco." -#: pkg/booking/public.go:332 +#: pkg/booking/public.go:288 #, c-format msgid "%s must be an integer." msgstr "%s tiene que ser un número entero." -#: pkg/booking/public.go:333 +#: pkg/booking/public.go:289 #, c-format msgid "%s must be %d or greater." msgstr "%s tiene que ser como mínimo %d." -#: pkg/booking/public.go:334 +#: pkg/booking/public.go:290 #, c-format msgid "%s must be at most %d." msgstr "%s tiene que ser como máximo %d" +#~ msgctxt "title" +#~ msgid "Party Details" +#~ msgstr "Datos de los visitantes" + +#~ msgctxt "input" +#~ msgid "Adults" +#~ msgstr "Adultos" + +#~ msgctxt "input" +#~ msgid "Teenagers (from 11 to 16 years old)" +#~ msgstr "Adolescentes (de 11 a 16 años)" + +#~ msgctxt "input" +#~ msgid "Children (up to 10 years old)" +#~ msgstr "Niños (hasta 10 años)" + +#~ msgctxt "input" +#~ msgid "Dogs" +#~ msgstr "Perros" + +#~ msgid "Number of adults can not be empty" +#~ msgstr "No podéis dejar el número de adultos blanco." + +#~ msgid "Number of adults must be an integer." +#~ msgstr "El número de adultos tiene que ser entero." + +#~ msgid "Number of adults must be one or greater." +#~ msgstr "El número de adultos no puede ser cero." + +#~ msgid "Number of teenagers can not be empty" +#~ msgstr "No podéis dejar el número de adolescentes en blanco." + +#~ msgid "Number of teenagers must be an integer." +#~ msgstr "El número de adolescentes tiene que ser entero." + +#~ msgid "Number of teenagers must be zero or greater." +#~ msgstr "El número de adolescentes tiene que ser como mínimo cero." + +#~ msgid "Number of children can not be empty" +#~ msgstr "No podéis dejar el número de niños en blanco." + +#~ msgid "Number of children must be an integer." +#~ msgstr "El número de niños tiene que ser entero." + +#~ msgid "Number of children must be zero or greater." +#~ msgstr "El número de niños tiene que ser como mínimo cero." + +#~ msgid "Number of dogs can not be empty" +#~ msgstr "No podéis dejar el número de perros en blanco." + +#~ msgid "Number of dogs must be an integer." +#~ msgstr "El número de perros tiene que ser entero." + +#~ msgid "Number of dogs must be zero or greater." +#~ msgstr "El número de perros tiene que ser como mínimo cero." + #~ msgid "%s: %s €/night" #~ msgstr "%s: %s €/noche" diff --git a/web/static/public.css b/web/static/public.css index 3eb4c93..30e90fd 100644 --- a/web/static/public.css +++ b/web/static/public.css @@ -899,6 +899,67 @@ dt { height: .8rem; } +#booking fieldset { + border: none; +} + +#booking legend { + font-weight: bold; +} + +#booking input:not([type="radio"]):not([type="checkbox"]), +#booking select { + width: 100%; +} + +#booking fieldset { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 3px solid black; +} + +#booking fieldset:first-of-type, +#booking fieldset:nth-of-type(3), +#booking fieldset:last-of-type { + display: grid; + row-gap: 1em; + column-gap: 1em; +} + +#booking fieldset.campsite-options { + transition: opacity .25s ease-in; +} + +#booking fieldset.campsite-options:not(.is-visible) { + visibility: hidden; + max-height: 0; + overflow: hidden; + margin: 0; + padding: 0; + border: none; + line-height: 0; + opacity: 0; +} + +#booking fieldset:first-of-type { + grid-template-columns: repeat(3, 1fr); +} + +#booking fieldset:nth-of-type(3) { + grid-template-columns: repeat(4, 1fr); +} + +#booking fieldset:last-of-type { + border-bottom: none; + grid-template-columns: repeat(2, 1fr); +} + +@media (max-width: 48rem) { + #booking fieldset { + grid-template-columns: 1fr !important; + } +} + body > footer { display: flex; flex-direction: column; diff --git a/web/templates/public/booking.gohtml b/web/templates/public/booking.gohtml index f5c82b3..cecdaf7 100644 --- a/web/templates/public/booking.gohtml +++ b/web/templates/public/booking.gohtml @@ -10,7 +10,7 @@ {{- /*gotype: dev.tandem.ws/tandem/camper/pkg/booking.publicPage*/ -}}

{{( pgettext "Booking" "title" )}}

{{ with .Form -}} -
+
{{( pgettext "Customer Details" "title" )}} {{ with .FullName -}} @@ -79,59 +79,29 @@ {{ template "error-message" . }} {{- end }}
-
- {{( pgettext "Party Details" "title" )}} - {{ with .Adults -}} - - {{ template "error-message" . }} - {{- end }} - {{ with .Teenagers -}} - - {{ template "error-message" . }} - {{- end }} - {{ with .Children -}} - - {{ template "error-message" . }} - {{- end }} - {{ with .Dogs -}} - - {{ template "error-message" . }} - {{- end }} -
{{( pgettext "Accomodation" "title" )}} {{ range .CampsiteType.Options -}}
{{- end }} {{ template "error-message" .CampsiteType }}
- {{ range .CampsiteType.Options -}} + {{ range $campsiteType := .CampsiteType.Options -}} {{ $options := index $.Form.CampsiteTypeOptions .Value }} {{ if $options -}} -
+
{{ .Label }} + {{ with $.Form.AreaPreferences -}} + + {{ template "error-message" . }} + {{- end }} {{ range $options -}} {{ template "error-message" . }} {{- end }} - {{ with .AreaPreferences -}} - - {{ template "error-message" . }} - {{- end }} {{ with .ACSICard -}}