Make sure at least one field is displayed in the booking page
This commit is contained in:
parent
dcc5084807
commit
d408b6040a
32 changed files with 37 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue