mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 16:42:27 +03:00
Merge pull request #1514 from sudwebdesign/develop-fix-untranslated-secretaries-js-errors
Fix untranslated secretaries + providers js (errors)
This commit is contained in:
commit
df51d689ee
2 changed files with 6 additions and 6 deletions
|
@ -288,7 +288,7 @@ App.Pages.Providers = (function () {
|
||||||
|
|
||||||
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
|
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
|
||||||
$('#password, #password-confirm').addClass('is-invalid');
|
$('#password, #password-confirm').addClass('is-invalid');
|
||||||
throw new Error(lang('password_length_notice').replace('$number', MIN_PASSWORD_LENGTH));
|
throw new Error(lang('password_length_notice').replace('$number', vars('min_password_length')));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate user email.
|
// Validate user email.
|
||||||
|
|
|
@ -285,24 +285,24 @@ App.Pages.Secretaries = (function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (missingRequired) {
|
if (missingRequired) {
|
||||||
throw new Error('Fields with * are required.');
|
throw new Error(lang('fields_are_required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate passwords.
|
// Validate passwords.
|
||||||
if ($password.val() !== $passwordConfirmation.val()) {
|
if ($password.val() !== $passwordConfirmation.val()) {
|
||||||
$('#password, #password-confirm').addClass('is-invalid');
|
$('#password, #password-confirm').addClass('is-invalid');
|
||||||
throw new Error('Passwords mismatch!');
|
throw new Error(lang('passwords_mismatch'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
|
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
|
||||||
$('#password, #password-confirm').addClass('is-invalid');
|
$('#password, #password-confirm').addClass('is-invalid');
|
||||||
throw new Error('Password must be at least ' + vars('min_password_length') + ' characters long.');
|
throw new Error(lang('password_length_notice').replace('$number', vars('min_password_length')));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate user email.
|
// Validate user email.
|
||||||
if (!App.Utils.Validation.email($email.val())) {
|
if (!App.Utils.Validation.email($email.val())) {
|
||||||
$email.addClass('is-invalid');
|
$email.addClass('is-invalid');
|
||||||
throw new Error('Invalid email address!');
|
throw new Error(lang('invalid_email'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate phone number.
|
// Validate phone number.
|
||||||
|
@ -324,7 +324,7 @@ App.Pages.Secretaries = (function () {
|
||||||
// Check if username exists
|
// Check if username exists
|
||||||
if ($username.attr('already-exists') === 'true') {
|
if ($username.attr('already-exists') === 'true') {
|
||||||
$username.addClass('is-invalid');
|
$username.addClass('is-invalid');
|
||||||
throw new Error('Username already exists.');
|
throw new Error(lang('username_already_exists'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue