]> wagnertech.de Git - timetracker.git/commitdiff
Disabled controls in week view with null values for TYPE_START_FINISH entry mode.
authoranuko <support@anuko.com>
Thu, 28 Dec 2017 17:50:22 +0000 (17:50 +0000)
committeranuko <support@anuko.com>
Thu, 28 Dec 2017 17:50:22 +0000 (17:50 +0000)
WEB-INF/templates/footer.tpl
week.php

index 8f48209325193ff9a33338769e1999d5a93d2b58..ab87268afbccba80c9ad4d5dfc3e4b8698864d4e 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.13.0.3702| Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.13.0.3703| 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 a015e85dd028d6ac08ba91e1601b03c3f96b63b3..d6fb6a3b5d82eddd2ef1854237a30ae137dddc92 100644 (file)
--- a/week.php
+++ b/week.php
@@ -146,6 +146,12 @@ class TimeCellRenderer extends DefaultCellRenderer {
     $field->setFormName($table->getFormName());
     $field->setSize(2);
     $field->setValue($table->getValueAt($row,$column)['duration']);
+    // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control
+    // because we can't supply start and finish times in week view - there are no fields for them.
+    global $user;
+    if (!$field->getValue() && TYPE_START_FINISH == $user->record_type) {
+        $field->setEnabled(false);
+    }
     $this->setValue($field->getHtml());
     return $this->toString();
   }