forked from mirrors/easyappointments
Service duration values shorter than 5 minutes should be acceptable via the services page (#1110).
This commit is contained in:
parent
4f5fbb8262
commit
42534ffcb3
2 changed files with 2 additions and 1 deletions
|
@ -62,6 +62,7 @@ class Services extends EA_Controller {
|
|||
script_vars([
|
||||
'user_id' => $user_id,
|
||||
'role_slug' => $role_slug,
|
||||
'event_minimum_duration' => EVENT_MINIMUM_DURATION,
|
||||
]);
|
||||
|
||||
html_vars([
|
||||
|
|
|
@ -241,7 +241,7 @@ App.Pages.Services = (function () {
|
|||
}
|
||||
|
||||
// Validate the duration.
|
||||
if (Number($duration.val()) < 5) {
|
||||
if (Number($duration.val()) < vars('event_minimum_duration')) {
|
||||
$duration.addClass('is-invalid');
|
||||
throw new Error(lang('invalid_duration'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue