X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/e457063f931911a1e9fc0917767dc07f92d24f02..387db9f30e6a45e1f25052af26c23ecdd1748e3a:/cf_custom_field_edit.php diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index 1f846590..15146db6 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -48,10 +48,9 @@ if ($errors->isEmpty()) { $form->addInput(array('type'=>'checkbox','name'=>'required','data'=>1,'value'=>$field['required'])); $form->addInput(array('type'=>'combobox','name'=>'type','value'=>$field['type'], 'data'=>array(CustomFields::TYPE_TEXT=>$i18n->getKey('label.type_text'), - CustomFields::TYPE_DROPDOWN=>$i18n->getKey('label.type_dropdown')) - )); - $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); -} + CustomFields::TYPE_DROPDOWN=>$i18n->getKey('label.type_dropdown')))); + $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); +} if ($request->getMethod() == 'POST') { $cl_name = trim($request->getParameter('name')); @@ -59,7 +58,7 @@ if ($request->getMethod() == 'POST') { $cl_required = $request->getParameter('required'); if (!$cl_required) $cl_required = 0; - + // Validate user input. if (!ttValidString($cl_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name')); @@ -71,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()"');