diff --git a/app/Http/Requests/BookingOptionRequest.php b/app/Http/Requests/BookingOptionRequest.php
index 2953c2d..b05fcab 100644
--- a/app/Http/Requests/BookingOptionRequest.php
+++ b/app/Http/Requests/BookingOptionRequest.php
@@ -63,6 +63,7 @@ public function rules(): array
'available_from' => [
'nullable',
'date_format:Y-m-d\TH:i',
+ 'required_with:available_until',
],
'available_until' => [
'nullable',
diff --git a/app/Http/Requests/EventRequest.php b/app/Http/Requests/EventRequest.php
index 3309bbf..29e6375 100644
--- a/app/Http/Requests/EventRequest.php
+++ b/app/Http/Requests/EventRequest.php
@@ -58,6 +58,7 @@ public function rules(): array
'started_at' => [
'nullable',
'date_format:Y-m-d\TH:i',
+ 'required_with:finished_at',
],
'finished_at' => [
'nullable',
@@ -65,7 +66,7 @@ public function rules(): array
],
'website_url' => [
'nullable',
- 'string',
+ 'url:http,https',
'max:255',
],
'location_id' => [
diff --git a/app/Http/Requests/GenerateGroupsRequest.php b/app/Http/Requests/GenerateGroupsRequest.php
index 655fa97..31f0c7c 100644
--- a/app/Http/Requests/GenerateGroupsRequest.php
+++ b/app/Http/Requests/GenerateGroupsRequest.php
@@ -93,8 +93,15 @@ public function rules(): array
public function attributes(): array
{
- return [
+ $attributes = [
'booking_option_id' => __('Booking options'),
+ 'exclude_parent_group_id' => __('Exclude members of groups'),
];
+
+ foreach (range(0, count($this->input('exclude_parent_group_id')) - 1) as $id) {
+ $attributes['exclude_parent_group_id.' . $id] = __('Exclude members of groups');
+ }
+
+ return $attributes;
}
}
diff --git a/app/Http/Requests/LocationRequest.php b/app/Http/Requests/LocationRequest.php
index c0a44b9..9713495 100644
--- a/app/Http/Requests/LocationRequest.php
+++ b/app/Http/Requests/LocationRequest.php
@@ -23,7 +23,7 @@ class LocationRequest extends FormRequest
*/
public function rules(): array
{
- $rules = [
+ return [
'name' => [
'nullable',
'string',
@@ -31,11 +31,10 @@ public function rules(): array
],
'website_url' => [
'nullable',
- 'string',
+ 'url:http,https',
'max:255',
],
+ ...$this->rulesForAddressFields('nullable'),
];
-
- return array_replace($rules, $this->rulesForAddressFields('nullable'));
}
}
diff --git a/app/Http/Requests/OrganizationRequest.php b/app/Http/Requests/OrganizationRequest.php
index 291ea31..e31fa8f 100644
--- a/app/Http/Requests/OrganizationRequest.php
+++ b/app/Http/Requests/OrganizationRequest.php
@@ -47,7 +47,7 @@ public function rules(): array
],
'website_url' => [
'nullable',
- 'string',
+ 'url:http,https',
'max:255',
],
'location_id' => [
diff --git a/lang/de.json b/lang/de.json
index 61cd074..0f86de4 100644
--- a/lang/de.json
+++ b/lang/de.json
@@ -107,6 +107,7 @@
"Edit users": "Benutzer bearbeiten",
"email field": "E-Mail-Feld",
"End date": "Enddatum",
+ "End of the booking period": "Ende des Anmeldezeitraums",
"End of the period": "Ende des Zeitraums",
"Event": "Veranstaltung",
"Event series": "Veranstaltungsreihen",
@@ -244,6 +245,7 @@
"Sorting": "Sortierung",
"spreadsheet": "Tabellenkalkulation",
"Start date": "Startdatum",
+ "Start of the booking period": "Beginn des Anmeldezeitraums",
"Start of the period": "Beginn des Zeitraums",
"Status": "Status",
"Street": "Straße",
diff --git a/lang/de/validation.php b/lang/de/validation.php
index 5e33061..dc077bd 100644
--- a/lang/de/validation.php
+++ b/lang/de/validation.php
@@ -162,7 +162,12 @@
'abilities' => 'Berechtigungen',
'address' => 'Adresse',
'approval_status' => 'Freigabestatus',
+ 'available_from' => 'Beginn des Anmeldezeitraums',
+ 'available_until' => 'Ende des Anmeldezeitraums',
+ 'booking_option_id' => 'Anmeldeoption',
+ 'city' => 'Stadt',
'comment' => 'Kommentar',
+ 'country' => 'Land',
'current_password' => 'Derzeitiges Passwort',
'date' => 'Datum',
'date_from' => 'Beginn des Zeitraums',
@@ -171,17 +176,21 @@
'day' => 'Tag',
'description' => 'Beschreibung',
'email' => 'E-Mail-Adresse',
+ 'event_series_id' => 'Teil der Veranstaltungsreihe',
'event_series_type' => 'Art der Veranstaltungsreihe',
'event_type' => 'Art der Veranstaltung',
'expires_at' => 'Ablaufdatum',
- 'file' => 'Datei',
'file_type' => 'Dateiformat',
+ 'file' => 'Datei',
+ 'finished_at' => 'Enddatum',
'first_name' => 'Vorname',
'groups_count' => 'Anzahl der Gruppen',
'height' => 'Höhe',
'hour' => 'Stunde',
+ 'house_number' => 'Hausnummer',
'last_name' => 'Nachname',
'location_id' => 'Standort',
+ 'maximum_bookings' => 'Maximale Anmeldungen',
'method' => 'Methode',
'minute' => 'Minute',
'month' => 'Monat',
@@ -194,21 +203,27 @@
'password' => 'Passwort',
'password_confirmation' => 'Passwort Bestätigung',
'phone' => 'Telefonnummer',
+ 'postal_code' => 'Postleitzahl',
'price' => 'Preis',
'register_entry' => 'Registereintrag',
'representatives' => 'Vertreter',
+ 'restrictions' => 'Einschränkungen',
'search' => 'Suchbegriff',
'second' => 'Sekunde',
'size' => 'Größe',
+ 'slug' => 'Slug',
'sort' => 'Sortierung',
+ 'started_at' => 'Startdatum',
'status' => 'Status',
+ 'street' => 'Straße',
+ 'terms_and_conditions' => 'AGB',
'thickness' => 'Dicke',
'time' => 'Uhrzeit',
'title' => 'Titel',
- 'terms_and_conditions' => 'AGB',
'unit' => 'Einheit',
'user_role_id' => 'Benutzerrolle',
'visibility' => 'Sichtbarkeit',
+ 'website_url' => 'Webauftritt',
'width' => 'Breite',
'year' => 'Jahr',
],
diff --git a/lang/en/validation.php b/lang/en/validation.php
index 4b09d1c..920b380 100644
--- a/lang/en/validation.php
+++ b/lang/en/validation.php
@@ -163,9 +163,23 @@
* As the database scheme is in English, translations work out of the box for the most attributes.
* The other attributes have to be added here.
*/
+ 'available_from' => 'Start of the booking period',
+ 'available_until' => 'End of the booking period',
+ 'booking_option_id' => 'Booking option',
+ 'date_from' => 'start of the period',
+ 'date_until' => 'end of the period',
+ 'event_series_id' => 'Part of the event series',
+ 'expires_at' => 'expiration date',
+ 'finished_at' => 'End date',
'location_id' => 'Location',
+ 'organization_id' => 'Organization',
+ 'parent_event_id' => 'Part of the event',
+ 'parent_event_series_id' => 'Part of the event series',
'parent_organization_id' => 'Parent organization',
+ 'search' => 'search term',
+ 'started_at' => 'Start date',
'user_role_id' => 'User role',
+ 'website_url' => 'website',
],
];
diff --git a/resources/views/booking_options/booking_option_form.blade.php b/resources/views/booking_options/booking_option_form.blade.php
index 72aeb20..abd6363 100644
--- a/resources/views/booking_options/booking_option_form.blade.php
+++ b/resources/views/booking_options/booking_option_form.blade.php
@@ -51,9 +51,9 @@
@endisset
{{ __('Start date') }}
+ :value="isset($bookingOption->available_from) ? $bookingOption->available_from->format('Y-m-d\TH:i') : null">{{ __('Start of the booking period') }}
{{ __('End date') }}
+ :value="isset($bookingOption->available_until) ? $bookingOption->available_until->format('Y-m-d\TH:i') : null">{{ __('End of the booking period') }}
{{ __('Price') }}