diff --git a/application/language/arabic/translations_lang.php b/application/language/arabic/translations_lang.php index d945e972..012ccbb6 100755 --- a/application/language/arabic/translations_lang.php +++ b/application/language/arabic/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/bulgarian/translations_lang.php b/application/language/bulgarian/translations_lang.php index 8f249a85..852cf25f 100755 --- a/application/language/bulgarian/translations_lang.php +++ b/application/language/bulgarian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/catalan/translations_lang.php b/application/language/catalan/translations_lang.php index dd1ffcc4..70bb1cbd 100644 --- a/application/language/catalan/translations_lang.php +++ b/application/language/catalan/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/chinese/translations_lang.php b/application/language/chinese/translations_lang.php index ec9c3801..497d2a27 100755 --- a/application/language/chinese/translations_lang.php +++ b/application/language/chinese/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/czech/translations_lang.php b/application/language/czech/translations_lang.php index dbbbf372..ca7e77e9 100644 --- a/application/language/czech/translations_lang.php +++ b/application/language/czech/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/danish/translations_lang.php b/application/language/danish/translations_lang.php index ae916549..9812f97d 100755 --- a/application/language/danish/translations_lang.php +++ b/application/language/danish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/dutch/translations_lang.php b/application/language/dutch/translations_lang.php index e701f399..156d2e15 100755 --- a/application/language/dutch/translations_lang.php +++ b/application/language/dutch/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/english/translations_lang.php b/application/language/english/translations_lang.php index 73447a59..f8caea6d 100755 --- a/application/language/english/translations_lang.php +++ b/application/language/english/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/estonian/translations_lang.php b/application/language/estonian/translations_lang.php index 671e3566..27f3ea64 100644 --- a/application/language/estonian/translations_lang.php +++ b/application/language/estonian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/finnish/translations_lang.php b/application/language/finnish/translations_lang.php index 401b1615..95ed81bf 100755 --- a/application/language/finnish/translations_lang.php +++ b/application/language/finnish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/french/translations_lang.php b/application/language/french/translations_lang.php index f3ea52ac..815059c4 100755 --- a/application/language/french/translations_lang.php +++ b/application/language/french/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/german/translations_lang.php b/application/language/german/translations_lang.php index 3cf9424e..2e0d5dde 100755 --- a/application/language/german/translations_lang.php +++ b/application/language/german/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/greek/translations_lang.php b/application/language/greek/translations_lang.php index 479ed8e4..60fc0a97 100755 --- a/application/language/greek/translations_lang.php +++ b/application/language/greek/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/hebrew/translations_lang.php b/application/language/hebrew/translations_lang.php index a0a03a7b..5ee023bc 100644 --- a/application/language/hebrew/translations_lang.php +++ b/application/language/hebrew/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/hindi/translations_lang.php b/application/language/hindi/translations_lang.php index 155efb81..c4dbd00a 100755 --- a/application/language/hindi/translations_lang.php +++ b/application/language/hindi/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/hungarian/translations_lang.php b/application/language/hungarian/translations_lang.php index 0f5e1b3a..e7fbceee 100755 --- a/application/language/hungarian/translations_lang.php +++ b/application/language/hungarian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/italian/translations_lang.php b/application/language/italian/translations_lang.php index 4d3d250e..39d10fdd 100755 --- a/application/language/italian/translations_lang.php +++ b/application/language/italian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/japanese/translations_lang.php b/application/language/japanese/translations_lang.php index 071a08dd..cca792b5 100755 --- a/application/language/japanese/translations_lang.php +++ b/application/language/japanese/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/luxembourgish/translations_lang.php b/application/language/luxembourgish/translations_lang.php index 8e86eb0b..73b70b90 100755 --- a/application/language/luxembourgish/translations_lang.php +++ b/application/language/luxembourgish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/marathi/translations_lang.php b/application/language/marathi/translations_lang.php index 3c1386b2..1815df5f 100644 --- a/application/language/marathi/translations_lang.php +++ b/application/language/marathi/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/persian/translations_lang.php b/application/language/persian/translations_lang.php index ab0dd558..1b6ae74b 100644 --- a/application/language/persian/translations_lang.php +++ b/application/language/persian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/polish/translations_lang.php b/application/language/polish/translations_lang.php index c3db825a..3fcbe467 100755 --- a/application/language/polish/translations_lang.php +++ b/application/language/polish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/portuguese-br/translations_lang.php b/application/language/portuguese-br/translations_lang.php index 9faffb10..92662835 100755 --- a/application/language/portuguese-br/translations_lang.php +++ b/application/language/portuguese-br/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/portuguese/translations_lang.php b/application/language/portuguese/translations_lang.php index c9a8f243..9d3dd1a0 100755 --- a/application/language/portuguese/translations_lang.php +++ b/application/language/portuguese/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/romanian/translations_lang.php b/application/language/romanian/translations_lang.php index 725666aa..df14a035 100755 --- a/application/language/romanian/translations_lang.php +++ b/application/language/romanian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/russian/translations_lang.php b/application/language/russian/translations_lang.php index d4205aab..869a103a 100755 --- a/application/language/russian/translations_lang.php +++ b/application/language/russian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/serbian/translations_lang.php b/application/language/serbian/translations_lang.php index a5933e74..3b960b82 100644 --- a/application/language/serbian/translations_lang.php +++ b/application/language/serbian/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/slovak/translations_lang.php b/application/language/slovak/translations_lang.php index 7f01f7d0..a0b25585 100755 --- a/application/language/slovak/translations_lang.php +++ b/application/language/slovak/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/spanish/translations_lang.php b/application/language/spanish/translations_lang.php index 409141c6..71a0dc43 100755 --- a/application/language/spanish/translations_lang.php +++ b/application/language/spanish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/swedish/translations_lang.php b/application/language/swedish/translations_lang.php index a3d4eefd..cb97806e 100644 --- a/application/language/swedish/translations_lang.php +++ b/application/language/swedish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/application/language/turkish/translations_lang.php b/application/language/turkish/translations_lang.php index a05d9d33..c90e76c4 100755 --- a/application/language/turkish/translations_lang.php +++ b/application/language/turkish/translations_lang.php @@ -404,4 +404,5 @@ $lang['limit_days'] = 'Limit (Days)'; $lang['future_booking_limit_hint'] = 'Set the future limit in days customers can make appointments via the public booking page.'; $lang['api_token'] = 'API Token'; $lang['allow_rescheduling_cancellation_before'] = 'Allow Rescheduling/Cancellation Before'; +$lang['at_least_one_field'] = 'At least one field must be displayed in the booking page.'; // End diff --git a/assets/js/pages/booking_settings.js b/assets/js/pages/booking_settings.js index 476f30c7..6a71b78b 100644 --- a/assets/js/pages/booking_settings.js +++ b/assets/js/pages/booking_settings.js @@ -46,6 +46,12 @@ App.Pages.BookingSettings = (function () { throw new Error(lang('fields_are_required')); } + // Ensure there is at least one field displayed. + + if (!$('.display-switch:checked').length) { + throw new Error(lang('at_least_one_field')); + } + return false; } catch (error) { App.Layouts.Backend.displayNotification(error.message); @@ -157,8 +163,6 @@ App.Pages.BookingSettings = (function () { */ function onSaveSettingsClick() { if (isInvalid()) { - App.Layouts.Backend.displayNotification(lang('settings_are_invalid')); - return; }