]> wagnertech.de Git - timetracker.git/blobdiff - cf_dropdown_option_edit.php
Switched to using shorter ActionErrors functions
[timetracker.git] / cf_dropdown_option_edit.php
index f61225bcc0f12fc3480c17d730e2d01be4ee0b58..4c5fc4a7f4f63604ff187ac057cb59a54e030bad 100644 (file)
@@ -42,7 +42,7 @@ if (false === $cl_name)
   $errors->add($i18n->getKey('error.db'));
 
 $form = new Form('optionEditForm');
-if ($errors->isEmpty()) {
+if ($errors->no()) {
   $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name));
   $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
   $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save')));
@@ -54,7 +54,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::updateOption($cl_id, $cl_name);
     if ($res) {
       // Determine field id for redirect.