X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_custom_field_edit.php;h=b6a1f461378a72ebf18f1c6f8b0079f143af3b50;hb=b4b57ea6a41c263250715f72248d48eae22f5476;hp=3d92d94502e4d8dc1a6d9d4ad289670f75e6c377;hpb=0e3c4d629800de449c5a1bb9da780993e5dc5277;p=timetracker.git diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index 3d92d945..b6a1f461 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -42,7 +42,7 @@ if (false === $field) $errors->add($i18n->getKey('error.db')); $form = new Form('fieldForm'); -if ($errors->isEmpty()) { +if ($errors->no()) { $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$field['label'])); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); $form->addInput(array('type'=>'checkbox','name'=>'required','data'=>1,'value'=>$field['required'])); @@ -62,7 +62,7 @@ if ($request->getMethod() == 'POST') { // Validate user input. if (!ttValidString($cl_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name')); - if ($errors->isEmpty()) { + if ($errors->no()) { $res = CustomFields::updateField($cl_id, $cl_name, $cl_type, $cl_required); if ($res) { header('Location: cf_custom_fields.php'); @@ -70,7 +70,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.db')); } -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"');