"fixing the fix: if no title was entered, you got a validation error instead of the blur-title"

This commit is contained in:
Ralf Becker 2007-06-09 14:56:49 +00:00
parent d56c51d71d
commit 81cb29ce8b

View File

@ -140,10 +140,15 @@ 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'])
{
$etpl->set_validation_error('ts_title',lang('Field must not be empty !!!'));
$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