When task entry is required - pre-selected a task when there is only one task available.
authoranuko <support@anuko.com>
Sat, 6 May 2017 18:08:47 +0000 (18:08 +0000)
committeranuko <support@anuko.com>
Sat, 6 May 2017 18:08:47 +0000 (18:08 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/time_script.tpl

index d4ff45b..66cf675 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.11.43.3629 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.11.43.3630 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 275f74c..109f67e 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;
+    }
   }
 }