X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=client_add.php;h=b2cdbe7687200a9f7e9525c6e7c3c30355753947;hb=b4b57ea6a41c263250715f72248d48eae22f5476;hp=b7187056942573a7ee111bef43d12e0bf818305e;hpb=0e3c4d629800de449c5a1bb9da780993e5dc5277;p=timetracker.git 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()"');