Remove the required attribute from service’s name input

It is virtually impossible to see when such a field fails prior to
submit the form, unless you happen to have the correct language selected
at the time.

Leave it to the backend’s validation for now.
This commit is contained in:
jordi fita mas 2024-01-24 11:13:39 +01:00
parent 7f865232e0
commit e4cd0cc963
4 changed files with 37 additions and 34 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: camper\n" "Project-Id-Version: camper\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2024-01-23 14:38+0100\n" "POT-Creation-Date: 2024-01-24 11:14+0100\n"
"PO-Revision-Date: 2023-07-22 23:45+0200\n" "PO-Revision-Date: 2023-07-22 23:45+0200\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n" "Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Catalan <ca@dodds.net>\n" "Language-Team: Catalan <ca@dodds.net>\n"
@ -453,7 +453,7 @@ msgstr "Àlies"
#: web/templates/admin/campsite/option/form.gohtml:41 #: web/templates/admin/campsite/option/form.gohtml:41
#: web/templates/admin/campsite/type/form.gohtml:51 #: web/templates/admin/campsite/type/form.gohtml:51
#: web/templates/admin/season/form.gohtml:50 #: web/templates/admin/season/form.gohtml:50
#: web/templates/admin/services/form.gohtml:52 #: web/templates/admin/services/form.gohtml:53
#: web/templates/admin/profile.gohtml:29 #: web/templates/admin/profile.gohtml:29
#: web/templates/admin/surroundings/form.gohtml:41 #: web/templates/admin/surroundings/form.gohtml:41
msgctxt "input" msgctxt "input"
@ -473,7 +473,7 @@ msgstr "Contingut"
#: web/templates/admin/campsite/option/form.gohtml:90 #: web/templates/admin/campsite/option/form.gohtml:90
#: web/templates/admin/campsite/type/form.gohtml:202 #: web/templates/admin/campsite/type/form.gohtml:202
#: web/templates/admin/season/form.gohtml:73 #: web/templates/admin/season/form.gohtml:73
#: web/templates/admin/services/form.gohtml:80 #: web/templates/admin/services/form.gohtml:81
#: web/templates/admin/surroundings/form.gohtml:69 #: web/templates/admin/surroundings/form.gohtml:69
#: web/templates/admin/surroundings/index.gohtml:58 #: web/templates/admin/surroundings/index.gohtml:58
#: web/templates/admin/home/index.gohtml:34 #: web/templates/admin/home/index.gohtml:34
@ -490,7 +490,7 @@ msgstr "Actualitza"
#: web/templates/admin/campsite/option/form.gohtml:92 #: web/templates/admin/campsite/option/form.gohtml:92
#: web/templates/admin/campsite/type/form.gohtml:204 #: web/templates/admin/campsite/type/form.gohtml:204
#: web/templates/admin/season/form.gohtml:75 #: web/templates/admin/season/form.gohtml:75
#: web/templates/admin/services/form.gohtml:82 #: web/templates/admin/services/form.gohtml:83
#: web/templates/admin/surroundings/form.gohtml:71 #: web/templates/admin/surroundings/form.gohtml:71
msgctxt "action" msgctxt "action"
msgid "Add" msgid "Add"
@ -544,17 +544,17 @@ msgctxt "input"
msgid "Directions" msgid "Directions"
msgstr "Instruccions" msgstr "Instruccions"
#: web/templates/admin/location.gohtml:38 #: web/templates/admin/location.gohtml:33
msgctxt "input" msgctxt "input"
msgid "Opening Dates" msgid "Opening Dates"
msgstr "Data dobertura" msgstr "Data dobertura"
#: web/templates/admin/location.gohtml:56 #: web/templates/admin/location.gohtml:46
msgctxt "input" msgctxt "input"
msgid "Map Embed" msgid "Map Embed"
msgstr "Incrustació del mapa" msgstr "Incrustació del mapa"
#: web/templates/admin/location.gohtml:63 web/templates/admin/profile.gohtml:78 #: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
#: web/templates/admin/taxDetails.gohtml:170 #: web/templates/admin/taxDetails.gohtml:170
#: web/templates/admin/booking/payment.gohtml:65 #: web/templates/admin/booking/payment.gohtml:65
msgctxt "action" msgctxt "action"
@ -595,7 +595,7 @@ msgid "Campsite Type Features"
msgstr "Característiques del tipus dallotjaments" msgstr "Característiques del tipus dallotjaments"
#: web/templates/admin/campsite/feature/form.gohtml:41 #: web/templates/admin/campsite/feature/form.gohtml:41
#: web/templates/admin/services/form.gohtml:34 #: web/templates/admin/services/form.gohtml:35
msgctxt "input" msgctxt "input"
msgid "Icon" msgid "Icon"
msgstr "Icona" msgstr "Icona"
@ -861,7 +861,7 @@ msgid "Facilities"
msgstr "Equipaments" msgstr "Equipaments"
#: web/templates/admin/campsite/type/form.gohtml:174 #: web/templates/admin/campsite/type/form.gohtml:174
#: web/templates/admin/services/form.gohtml:65 #: web/templates/admin/services/form.gohtml:66
#: web/templates/admin/surroundings/form.gohtml:54 #: web/templates/admin/surroundings/form.gohtml:54
msgctxt "input" msgctxt "input"
msgid "Description" msgid "Description"
@ -984,17 +984,18 @@ msgid "Login"
msgstr "Entra" msgstr "Entra"
#: web/templates/admin/services/form.gohtml:8 #: web/templates/admin/services/form.gohtml:8
#: web/templates/admin/services/form.gohtml:25 #: web/templates/admin/services/form.gohtml:26
msgctxt "title" msgctxt "title"
msgid "Edit Service" msgid "Edit Service"
msgstr "Edició de servei" msgstr "Edició de servei"
#: web/templates/admin/services/form.gohtml:10 #: web/templates/admin/services/form.gohtml:10
#: web/templates/admin/services/form.gohtml:27 #: web/templates/admin/services/form.gohtml:28
msgctxt "title" msgctxt "title"
msgid "New Service" msgid "New Service"
msgstr "Nou servei" msgstr "Nou servei"
#: web/templates/admin/services/form.gohtml:15
#: web/templates/admin/services/index.gohtml:6 #: web/templates/admin/services/index.gohtml:6
#: web/templates/admin/layout.gohtml:58 #: web/templates/admin/layout.gohtml:58
msgctxt "title" msgctxt "title"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: camper\n" "Project-Id-Version: camper\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2024-01-23 14:38+0100\n" "POT-Creation-Date: 2024-01-24 11:14+0100\n"
"PO-Revision-Date: 2023-07-22 23:46+0200\n" "PO-Revision-Date: 2023-07-22 23:46+0200\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n" "Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Spanish <es@tp.org.es>\n" "Language-Team: Spanish <es@tp.org.es>\n"
@ -453,7 +453,7 @@ msgstr "Álias"
#: web/templates/admin/campsite/option/form.gohtml:41 #: web/templates/admin/campsite/option/form.gohtml:41
#: web/templates/admin/campsite/type/form.gohtml:51 #: web/templates/admin/campsite/type/form.gohtml:51
#: web/templates/admin/season/form.gohtml:50 #: web/templates/admin/season/form.gohtml:50
#: web/templates/admin/services/form.gohtml:52 #: web/templates/admin/services/form.gohtml:53
#: web/templates/admin/profile.gohtml:29 #: web/templates/admin/profile.gohtml:29
#: web/templates/admin/surroundings/form.gohtml:41 #: web/templates/admin/surroundings/form.gohtml:41
msgctxt "input" msgctxt "input"
@ -473,7 +473,7 @@ msgstr "Contenido"
#: web/templates/admin/campsite/option/form.gohtml:90 #: web/templates/admin/campsite/option/form.gohtml:90
#: web/templates/admin/campsite/type/form.gohtml:202 #: web/templates/admin/campsite/type/form.gohtml:202
#: web/templates/admin/season/form.gohtml:73 #: web/templates/admin/season/form.gohtml:73
#: web/templates/admin/services/form.gohtml:80 #: web/templates/admin/services/form.gohtml:81
#: web/templates/admin/surroundings/form.gohtml:69 #: web/templates/admin/surroundings/form.gohtml:69
#: web/templates/admin/surroundings/index.gohtml:58 #: web/templates/admin/surroundings/index.gohtml:58
#: web/templates/admin/home/index.gohtml:34 #: web/templates/admin/home/index.gohtml:34
@ -490,7 +490,7 @@ msgstr "Actualizar"
#: web/templates/admin/campsite/option/form.gohtml:92 #: web/templates/admin/campsite/option/form.gohtml:92
#: web/templates/admin/campsite/type/form.gohtml:204 #: web/templates/admin/campsite/type/form.gohtml:204
#: web/templates/admin/season/form.gohtml:75 #: web/templates/admin/season/form.gohtml:75
#: web/templates/admin/services/form.gohtml:82 #: web/templates/admin/services/form.gohtml:83
#: web/templates/admin/surroundings/form.gohtml:71 #: web/templates/admin/surroundings/form.gohtml:71
msgctxt "action" msgctxt "action"
msgid "Add" msgid "Add"
@ -544,17 +544,17 @@ msgctxt "input"
msgid "Directions" msgid "Directions"
msgstr "Instrucciones" msgstr "Instrucciones"
#: web/templates/admin/location.gohtml:38 #: web/templates/admin/location.gohtml:33
msgctxt "input" msgctxt "input"
msgid "Opening Dates" msgid "Opening Dates"
msgstr "Fechas de apertura" msgstr "Fechas de apertura"
#: web/templates/admin/location.gohtml:56 #: web/templates/admin/location.gohtml:46
msgctxt "input" msgctxt "input"
msgid "Map Embed" msgid "Map Embed"
msgstr "Incrustación del mapa" msgstr "Incrustación del mapa"
#: web/templates/admin/location.gohtml:63 web/templates/admin/profile.gohtml:78 #: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
#: web/templates/admin/taxDetails.gohtml:170 #: web/templates/admin/taxDetails.gohtml:170
#: web/templates/admin/booking/payment.gohtml:65 #: web/templates/admin/booking/payment.gohtml:65
msgctxt "action" msgctxt "action"
@ -595,7 +595,7 @@ msgid "Campsite Type Features"
msgstr "Características del tipo de alojamiento" msgstr "Características del tipo de alojamiento"
#: web/templates/admin/campsite/feature/form.gohtml:41 #: web/templates/admin/campsite/feature/form.gohtml:41
#: web/templates/admin/services/form.gohtml:34 #: web/templates/admin/services/form.gohtml:35
msgctxt "input" msgctxt "input"
msgid "Icon" msgid "Icon"
msgstr "Icono" msgstr "Icono"
@ -861,7 +861,7 @@ msgid "Facilities"
msgstr "Equipamento" msgstr "Equipamento"
#: web/templates/admin/campsite/type/form.gohtml:174 #: web/templates/admin/campsite/type/form.gohtml:174
#: web/templates/admin/services/form.gohtml:65 #: web/templates/admin/services/form.gohtml:66
#: web/templates/admin/surroundings/form.gohtml:54 #: web/templates/admin/surroundings/form.gohtml:54
msgctxt "input" msgctxt "input"
msgid "Description" msgid "Description"
@ -984,17 +984,18 @@ msgid "Login"
msgstr "Entrar" msgstr "Entrar"
#: web/templates/admin/services/form.gohtml:8 #: web/templates/admin/services/form.gohtml:8
#: web/templates/admin/services/form.gohtml:25 #: web/templates/admin/services/form.gohtml:26
msgctxt "title" msgctxt "title"
msgid "Edit Service" msgid "Edit Service"
msgstr "Edición de servicio" msgstr "Edición de servicio"
#: web/templates/admin/services/form.gohtml:10 #: web/templates/admin/services/form.gohtml:10
#: web/templates/admin/services/form.gohtml:27 #: web/templates/admin/services/form.gohtml:28
msgctxt "title" msgctxt "title"
msgid "New Service" msgid "New Service"
msgstr "Nuevo servicio" msgstr "Nuevo servicio"
#: web/templates/admin/services/form.gohtml:15
#: web/templates/admin/services/index.gohtml:6 #: web/templates/admin/services/index.gohtml:6
#: web/templates/admin/layout.gohtml:58 #: web/templates/admin/layout.gohtml:58
msgctxt "title" msgctxt "title"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: camper\n" "Project-Id-Version: camper\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2024-01-23 14:38+0100\n" "POT-Creation-Date: 2024-01-24 11:14+0100\n"
"PO-Revision-Date: 2023-12-20 10:13+0100\n" "PO-Revision-Date: 2023-12-20 10:13+0100\n"
"Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n" "Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n"
"Language-Team: French <traduc@traduc.org>\n" "Language-Team: French <traduc@traduc.org>\n"
@ -454,7 +454,7 @@ msgstr "Slug"
#: web/templates/admin/campsite/option/form.gohtml:41 #: web/templates/admin/campsite/option/form.gohtml:41
#: web/templates/admin/campsite/type/form.gohtml:51 #: web/templates/admin/campsite/type/form.gohtml:51
#: web/templates/admin/season/form.gohtml:50 #: web/templates/admin/season/form.gohtml:50
#: web/templates/admin/services/form.gohtml:52 #: web/templates/admin/services/form.gohtml:53
#: web/templates/admin/profile.gohtml:29 #: web/templates/admin/profile.gohtml:29
#: web/templates/admin/surroundings/form.gohtml:41 #: web/templates/admin/surroundings/form.gohtml:41
msgctxt "input" msgctxt "input"
@ -474,7 +474,7 @@ msgstr "Contenu"
#: web/templates/admin/campsite/option/form.gohtml:90 #: web/templates/admin/campsite/option/form.gohtml:90
#: web/templates/admin/campsite/type/form.gohtml:202 #: web/templates/admin/campsite/type/form.gohtml:202
#: web/templates/admin/season/form.gohtml:73 #: web/templates/admin/season/form.gohtml:73
#: web/templates/admin/services/form.gohtml:80 #: web/templates/admin/services/form.gohtml:81
#: web/templates/admin/surroundings/form.gohtml:69 #: web/templates/admin/surroundings/form.gohtml:69
#: web/templates/admin/surroundings/index.gohtml:58 #: web/templates/admin/surroundings/index.gohtml:58
#: web/templates/admin/home/index.gohtml:34 #: web/templates/admin/home/index.gohtml:34
@ -491,7 +491,7 @@ msgstr "Mettre à jour"
#: web/templates/admin/campsite/option/form.gohtml:92 #: web/templates/admin/campsite/option/form.gohtml:92
#: web/templates/admin/campsite/type/form.gohtml:204 #: web/templates/admin/campsite/type/form.gohtml:204
#: web/templates/admin/season/form.gohtml:75 #: web/templates/admin/season/form.gohtml:75
#: web/templates/admin/services/form.gohtml:82 #: web/templates/admin/services/form.gohtml:83
#: web/templates/admin/surroundings/form.gohtml:71 #: web/templates/admin/surroundings/form.gohtml:71
msgctxt "action" msgctxt "action"
msgid "Add" msgid "Add"
@ -545,17 +545,17 @@ msgctxt "input"
msgid "Directions" msgid "Directions"
msgstr "Directions" msgstr "Directions"
#: web/templates/admin/location.gohtml:38 #: web/templates/admin/location.gohtml:33
msgctxt "input" msgctxt "input"
msgid "Opening Dates" msgid "Opening Dates"
msgstr "Dates douverture" msgstr "Dates douverture"
#: web/templates/admin/location.gohtml:56 #: web/templates/admin/location.gohtml:46
msgctxt "input" msgctxt "input"
msgid "Map Embed" msgid "Map Embed"
msgstr "Carte intégrée" msgstr "Carte intégrée"
#: web/templates/admin/location.gohtml:63 web/templates/admin/profile.gohtml:78 #: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
#: web/templates/admin/taxDetails.gohtml:170 #: web/templates/admin/taxDetails.gohtml:170
#: web/templates/admin/booking/payment.gohtml:65 #: web/templates/admin/booking/payment.gohtml:65
msgctxt "action" msgctxt "action"
@ -596,7 +596,7 @@ msgid "Campsite Type Features"
msgstr "Caractéristiques du type demplacement de camping" msgstr "Caractéristiques du type demplacement de camping"
#: web/templates/admin/campsite/feature/form.gohtml:41 #: web/templates/admin/campsite/feature/form.gohtml:41
#: web/templates/admin/services/form.gohtml:34 #: web/templates/admin/services/form.gohtml:35
msgctxt "input" msgctxt "input"
msgid "Icon" msgid "Icon"
msgstr "Icône" msgstr "Icône"
@ -862,7 +862,7 @@ msgid "Facilities"
msgstr "Installations" msgstr "Installations"
#: web/templates/admin/campsite/type/form.gohtml:174 #: web/templates/admin/campsite/type/form.gohtml:174
#: web/templates/admin/services/form.gohtml:65 #: web/templates/admin/services/form.gohtml:66
#: web/templates/admin/surroundings/form.gohtml:54 #: web/templates/admin/surroundings/form.gohtml:54
msgctxt "input" msgctxt "input"
msgid "Description" msgid "Description"
@ -985,17 +985,18 @@ msgid "Login"
msgstr "Connexion" msgstr "Connexion"
#: web/templates/admin/services/form.gohtml:8 #: web/templates/admin/services/form.gohtml:8
#: web/templates/admin/services/form.gohtml:25 #: web/templates/admin/services/form.gohtml:26
msgctxt "title" msgctxt "title"
msgid "Edit Service" msgid "Edit Service"
msgstr "Modifier le service" msgstr "Modifier le service"
#: web/templates/admin/services/form.gohtml:10 #: web/templates/admin/services/form.gohtml:10
#: web/templates/admin/services/form.gohtml:27 #: web/templates/admin/services/form.gohtml:28
msgctxt "title" msgctxt "title"
msgid "New Service" msgid "New Service"
msgstr "Nouveau service" msgstr "Nouveau service"
#: web/templates/admin/services/form.gohtml:15
#: web/templates/admin/services/index.gohtml:6 #: web/templates/admin/services/index.gohtml:6
#: web/templates/admin/layout.gohtml:58 #: web/templates/admin/layout.gohtml:58
msgctxt "title" msgctxt "title"

View File

@ -55,7 +55,7 @@
{{ range $lang, $input := . -}} {{ range $lang, $input := . -}}
<label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br> <label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br>
<input type="text" name="{{ $input.Name }}" value="{{ $input.Val }}" <input type="text" name="{{ $input.Name }}" value="{{ $input.Val }}"
required {{ template "error-attrs" $input }}><br> {{ template "error-attrs" $input }}><br>
</label> </label>
{{- end }} {{- end }}
{{ template "error-message" . }} {{ template "error-message" . }}