Added a field for note value in week view to apply to new entries.
authoranuko <support@anuko.com>
Sat, 30 Dec 2017 13:54:49 +0000 (13:54 +0000)
committeranuko <support@anuko.com>
Sat, 30 Dec 2017 13:54:49 +0000 (13:54 +0000)
WEB-INF/lib/ttTimeHelper.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/week.tpl
week.php

index cf521b6..8bc2012 100644 (file)
@@ -1074,6 +1074,7 @@ class ttTimeHelper {
     $fields4insert['billable'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'bl');
     $fields4insert['project'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'pr');
     $fields4insert['task'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'ts');
+    $fields4insert['note'] = $fields['note'];
 
     // Try to insert a record.
     $id = ttTimeHelper::insert($fields4insert);
index 44ffd6c..c7cbc49 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.2.3710| 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.2.3711| 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 74d1441..97a5a30 100644 (file)
           <td>{$forms.weekTimeForm.task.control}</td>
         </tr>
 {/if}
+        <tr>
+          <td align="right">{$i18n.label.note}:</td>
+          <td align="left">{$forms.weekTimeForm.note.control}</td>
+        </tr>
       </table>
     </td>
     <td valign="top">
index d457837..3cb4ea7 100644 (file)
--- a/week.php
+++ b/week.php
@@ -106,6 +106,7 @@ $cl_project = $request->getParameter('project', ($request->getMethod()=='POST'?
 $_SESSION['project'] = $cl_project;
 $cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task']));
 $_SESSION['task'] = $cl_task;
+$cl_note = trim($request->getParameter('note'));
 
 // Get the data we need to display week view.
 // Get column headers, which are day numbers in month.
@@ -257,6 +258,7 @@ if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
     'datakeys'=>array('id','name'),
     'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
 }
+$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note));
 
 // Add other controls.
 $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar
@@ -353,6 +355,7 @@ if ($request->isPost()) {
               $record['task_id'] = $cl_task;
               $record['cf_1_value'] = $cl_cf_1;
               $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0';
+              $fields['note'] = $cl_note;
             }
             $fields['day_header'] = $dayHeader;
             $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader.