]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/templates/time_script.tpl
Cosmetic UI fixes for report table.
[timetracker.git] / WEB-INF / templates / time_script.tpl
index 275f74c6bc153ac42637880265c1f140ca9f531c..109f67ee8013c7bb37f4d2999168a571f99e5f59 100644 (file)
@@ -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;
+    }
   }
 }