mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2025-01-19 04:00:03 +03:00
Make sure that at least one booking field must be set as required
This commit is contained in:
parent
ec545a265e
commit
f7e6b212b2
34 changed files with 39 additions and 0 deletions
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'Der Benutzerdatensatz wurde erfolgreich importiert.';
|
||||||
$lang['import'] = 'Importieren';
|
$lang['import'] = 'Importieren';
|
||||||
$lang['ldap_dn'] = 'LDAP-DN';
|
$lang['ldap_dn'] = 'LDAP-DN';
|
||||||
$lang['role'] = 'Rolle';
|
$lang['role'] = 'Rolle';
|
||||||
|
$lang['at_least_one_field_required'] = 'Mindestens ein Feld muss auf der Buchungsseite als erforderlich gekennzeichnet sein.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'Η εγγραφή χρήστη εισήχθη με ε
|
||||||
$lang['import'] = 'Εισαγωγή';
|
$lang['import'] = 'Εισαγωγή';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Ρόλος';
|
$lang['role'] = 'Ρόλος';
|
||||||
|
$lang['at_least_one_field_required'] = 'Τουλάχιστον ένα πεδίο πρέπει να έχει οριστεί ως υποχρεωτικό στη σελίδα κράτησης.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -477,4 +477,5 @@ $lang['user_imported'] = 'The user record was imported successfully.';
|
||||||
$lang['import'] = 'Import';
|
$lang['import'] = 'Import';
|
||||||
$lang['ldap_dn'] = 'LDAP DN';
|
$lang['ldap_dn'] = 'LDAP DN';
|
||||||
$lang['role'] = 'Role';
|
$lang['role'] = 'Role';
|
||||||
|
$lang['at_least_one_field_required'] = 'At least one field must be set as required in the booking page.';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -52,6 +52,12 @@ App.Pages.BookingSettings = (function () {
|
||||||
throw new Error(lang('at_least_one_field'));
|
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;
|
return false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
App.Layouts.Backend.displayNotification(error.message);
|
App.Layouts.Backend.displayNotification(error.message);
|
||||||
|
|
Loading…
Reference in a new issue