Service duration values shorter than 5 minutes should be acceptable via the services page (#1110).

This commit is contained in:
Alex Tselegidis 2022-01-24 22:09:30 +01:00
parent 4f5fbb8262
commit 42534ffcb3
2 changed files with 2 additions and 1 deletions

View file

@ -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([

View file

@ -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'));
}