* Timesheet: fix lost comment when viewtype was set to simple

r48574: Fix doubled description ID (ts_description), caused lost comment when viewtype was set to simple
This commit is contained in:
Ralf Becker 2014-09-10 11:14:18 +00:00
parent a8088acfe0
commit 1ce490ebcc
2 changed files with 3 additions and 1 deletions

View File

@ -107,6 +107,7 @@ class timesheet_ui extends timesheet_bo
if ($this->ts_viewtype == 'short')
{
$content['start_time']=$content['end_time']=null;
$content['ts_description'] = $content['ts_description_short'];
}
// we only need 2 out of 3 values from start-, end-time or duration (the date in ts_start is always required!)
if (isset($content['start_time'])) // start-time specified
@ -438,6 +439,7 @@ class timesheet_ui extends timesheet_bo
if($this->ts_viewtype == 'short')
{
$content['ts_viewtype'] = $readonlys['tabs']['notes'] = true;
$content['ts_description_short'] = $content['ts_description'];
}
if (!$this->customfields) $readonlys['tabs']['customfields'] = true; // suppress tab if there are not customfields
if (!$this->data['ts_id']) $readonlys['tabs']['history'] = true; //suppress history for the first loading without ID

View File

@ -35,7 +35,7 @@
</row>
<row class="row" disabled="!@ts_viewtype">
<description value="comment"/>
<textbox multiline="true" id="ts_description" rows="5" cols="50" class="et2_fullWidth"/>
<textbox multiline="true" id="ts_description_short" rows="5" cols="50" class="et2_fullWidth"/>
<description/>
<description/>
<description/>