From: anuko Date: Sat, 6 May 2017 18:08:47 +0000 (+0000) Subject: When task entry is required - pre-selected a task when there is only one task available. X-Git-Tag: timetracker_1.19-1~1520 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4c63df1707fc6544e380af0e2e77ccdc84ab00a7;p=timetracker.git When task entry is required - pre-selected a task when there is only one task available. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d4ff45b8..66cf675f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.11.43.3629 | Copyright © Anuko | +  Anuko Time Tracker 1.11.43.3630 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/time_script.tpl b/WEB-INF/templates/time_script.tpl index 275f74c6..109f67ee 100644 --- a/WEB-INF/templates/time_script.tpl +++ b/WEB-INF/templates/time_script.tpl @@ -143,6 +143,11 @@ function fillTaskDropdown(id) { } } } + + // Select a task if user is required to do so and there is only one task available. + if ({$user->task_required} && dropdown.options.length == 2) { // 2 because of mandatory top option. + dropdown.options[1].selected = true; + } } }