X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/0e3c4d629800de449c5a1bb9da780993e5dc5277..4df61856250643178176215235ffe106cb3cb4ea:/client_add.php diff --git a/client_add.php b/client_add.php index b7187056..b2cdbe76 100644 --- a/client_add.php +++ b/client_add.php @@ -64,7 +64,7 @@ if ($request->getMethod() == 'POST') { if (!ttValidString($cl_address, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.client_address')); if (!ttValidFloat($cl_tax, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.tax')); - if ($errors->isEmpty()) { + if ($errors->no()) { if (!ttClientHelper::getClientByName($cl_name)) { if (ttClientHelper::insert(array( 'team_id' => $user->team_id, @@ -80,7 +80,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.client_exists')); } -} // post +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.clientForm.name.focus()"');