Make sure that at least one booking field must be set as required

This commit is contained in:
Alex Tselegidis 2024-05-14 13:49:41 +02:00
parent ec545a265e
commit f7e6b212b2
34 changed files with 39 additions and 0 deletions

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'Der Benutzerdatensatz wurde erfolgreich importiert.';
$lang['import'] = 'Importieren';
$lang['ldap_dn'] = 'LDAP-DN';
$lang['role'] = 'Rolle';
$lang['at_least_one_field_required'] = 'Mindestens ein Feld muss auf der Buchungsseite als erforderlich gekennzeichnet sein.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'Η εγγραφή χρήστη εισήχθη με ε
$lang['import'] = 'Εισαγωγή';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Ρόλος';
$lang['at_least_one_field_required'] = 'Τουλάχιστον ένα πεδίο πρέπει να έχει οριστεί ως υποχρεωτικό στη σελίδα κράτησης.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
$lang['import'] = 'Import';
$lang['ldap_dn'] = 'LDAP DN';
$lang['role'] = 'Role';
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
// End

View file

@ -52,6 +52,12 @@ App.Pages.BookingSettings = (function () {
throw new Error(lang('at_least_one_field'));
}
// Ensure there is at least one field required.
if (!$('.require-switch:checked').length) {
throw new Error(lang('at_least_one_field_required'));
}
return false;
} catch (error) {
App.Layouts.Backend.displayNotification(error.message);