Skip to content

Commit f5a30f6

Browse files
Fix label and validation messages for booking period
1 parent 25a1eea commit f5a30f6

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

app/Http/Requests/BookingOptionRequest.php

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function rules(): array
6363
'available_from' => [
6464
'nullable',
6565
'date_format:Y-m-d\TH:i',
66+
'required_with:available_until',
6667
],
6768
'available_until' => [
6869
'nullable',

lang/de.json

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"Edit users": "Benutzer bearbeiten",
108108
"email field": "E-Mail-Feld",
109109
"End date": "Enddatum",
110+
"End of the booking period": "Ende des Anmeldezeitraums",
110111
"End of the period": "Ende des Zeitraums",
111112
"Event": "Veranstaltung",
112113
"Event series": "Veranstaltungsreihen",
@@ -244,6 +245,7 @@
244245
"Sorting": "Sortierung",
245246
"spreadsheet": "Tabellenkalkulation",
246247
"Start date": "Startdatum",
248+
"Start of the booking period": "Beginn des Anmeldezeitraums",
247249
"Start of the period": "Beginn des Zeitraums",
248250
"Status": "Status",
249251
"Street": "Straße",

lang/de/validation.php

+2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@
162162
'abilities' => 'Berechtigungen',
163163
'address' => 'Adresse',
164164
'approval_status' => 'Freigabestatus',
165+
'available_from' => 'Beginn des Anmeldezeitraums',
166+
'available_until' => 'Ende des Anmeldezeitraums',
165167
'booking_option_id' => 'Anmeldeoption',
166168
'city' => 'Stadt',
167169
'comment' => 'Kommentar',

lang/en/validation.php

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@
163163
* As the database scheme is in English, translations work out of the box for the most attributes.
164164
* The other attributes have to be added here.
165165
*/
166+
'available_from' => 'Start of the booking period',
167+
'available_until' => 'End of the booking period',
166168
'booking_option_id' => 'Booking option',
167169
'date_from' => 'start of the period',
168170
'date_until' => 'end of the period',

resources/views/booking_options/booking_option_form.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
@endisset
5252
</x-bs::form.field>
5353
<x-bs::form.field name="available_from" type="datetime-local"
54-
:value="isset($bookingOption->available_from) ? $bookingOption->available_from->format('Y-m-d\TH:i') : null">{{ __('Start date') }}</x-bs::form.field>
54+
:value="isset($bookingOption->available_from) ? $bookingOption->available_from->format('Y-m-d\TH:i') : null">{{ __('Start of the booking period') }}</x-bs::form.field>
5555
<x-bs::form.field name="available_until" type="datetime-local"
56-
:value="isset($bookingOption->available_until) ? $bookingOption->available_until->format('Y-m-d\TH:i') : null">{{ __('End date') }}</x-bs::form.field>
56+
:value="isset($bookingOption->available_until) ? $bookingOption->available_until->format('Y-m-d\TH:i') : null">{{ __('End of the booking period') }}</x-bs::form.field>
5757
<x-bs::form.field name="price" type="number" min="0.01" step="0.01"
5858
:value="$bookingOption->price ?? null">
5959
{{ __('Price') }}

0 commit comments

Comments
 (0)