diff --git a/apps/workflowengine/appinfo/routes.php b/apps/workflowengine/appinfo/routes.php
index b8c9ae1c23..5ae74bcafc 100644
--- a/apps/workflowengine/appinfo/routes.php
+++ b/apps/workflowengine/appinfo/routes.php
@@ -25,5 +25,6 @@ return [
['name' => 'flowOperations#addOperation', 'url' => '/operations', 'verb' => 'POST'],
['name' => 'flowOperations#updateOperation', 'url' => '/operations/{id}', 'verb' => 'PUT'],
['name' => 'flowOperations#deleteOperation', 'url' => '/operations/{id}', 'verb' => 'DELETE'],
+ ['name' => 'requestTime#getTimezones', 'url' => '/timezones', 'verb' => 'GET'],
]
];
diff --git a/apps/workflowengine/js/admin.js b/apps/workflowengine/js/admin.js
index ec921f8c22..447237c560 100644
--- a/apps/workflowengine/js/admin.js
+++ b/apps/workflowengine/js/admin.js
@@ -308,7 +308,6 @@
}, 7000, this.$el.find('.msg.success'));
this.message = '';
}
-
}
});
diff --git a/apps/workflowengine/js/requesttimeplugin.js b/apps/workflowengine/js/requesttimeplugin.js
index 96cb8a40f7..111b2bb743 100644
--- a/apps/workflowengine/js/requesttimeplugin.js
+++ b/apps/workflowengine/js/requesttimeplugin.js
@@ -44,10 +44,11 @@
return;
}
- var startTime = '16:00',
+ var startTime = '09:00',
endTime = '18:00',
- timezone = 'Europe/London',
+ timezone = jstz.determine().name(),
$element = $(element);
+
if (_.isString(check['value']) && check['value'] !== '') {
var value = JSON.parse(check['value']),
splittedStart = value[0].split(' ', 2),
@@ -57,6 +58,7 @@
endTime = splittedEnd[0];
timezone = splittedStart[1];
}
+
var valueJSON = JSON.stringify([startTime + ' ' + timezone, endTime + ' ' + timezone]);
if (check['value'] !== valueJSON) {
check['value'] = valueJSON;
@@ -68,28 +70,78 @@
$('')
.attr('type', 'text')
.attr('placeholder', t('workflowengine', 'Start'))
+ .attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: '16:00'}))
+ .addClass('has-tooltip')
+ .tooltip({
+ placement: 'bottom'
+ })
.addClass('start')
.val(startTime)
.insertBefore($element);
$('')
.attr('type', 'text')
.attr('placeholder', t('workflowengine', 'End'))
+ .attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: '16:00'}))
+ .addClass('has-tooltip')
+ .tooltip({
+ placement: 'bottom'
+ })
.addClass('end')
.val(endTime)
.insertBefore($element);
- var timezoneSelect = $('