X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_custom_field_edit.php;h=8b481a67821e47155c7609c116c6c75de9f48fea;hb=ad98b13400fdc2fa2299a22c9bd54c4cd27960c3;hp=f368515ce0aa5bcb7afca351a2a306cb92622f13;hpb=9e82b53fc5d8cb1e54b5fde774fa68a916f28b4c;p=timetracker.git diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index f368515c..8b481a67 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -31,7 +31,7 @@ require_once('plugins/CustomFields.class.php'); import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } @@ -45,7 +45,7 @@ $form = new Form('fieldForm'); if ($err->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'])); + $form->addInput(array('type'=>'checkbox','name'=>'required','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')))); @@ -70,7 +70,7 @@ if ($request->isPost()) { } else $err->add($i18n->getKey('error.db')); } -} // POST +} // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"');