X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/2b33db994ef8ee17de49df35afac00e4b1a6d45b..f20ec5fb1e42bf4a273cb2d3a99d3d7b33c2ff48:/WEB-INF/templates/time_script.tpl 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; + } } }