merging fix from trunk: validation error instead of using the blur-title

This commit is contained in:
Ralf Becker 2007-06-13 16:57:30 +00:00
parent e7b8845f71
commit f241911ce7

View File

@ -140,11 +140,16 @@ class uitimesheet extends botimesheet
{
$this->data['ts_title'] = $this->data['ts_project'];
}
if (!$this->data['ts_title']) $this->data['ts_title'] = $this->data['ts_title_blur'];
if (!$this->data['ts_title'])
{
$this->data['ts_title'] = $this->data['ts_title_blur'] ?
$this->data['ts_title_blur'] : $this->data['ts_project_blur'];
if (!$this->data['ts_title'])
{
$etpl->set_validation_error('ts_title',lang('Field must not be empty !!!'));
}
}
if ($etpl->validation_errors()) break; // the user need to fix the error, before we can save the entry
if ($this->save() != 0)