X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_custom_field_edit.php;h=295e4079092e6c7d9fc9aaebae61fb342cc44f66;hb=9eee35c738a83c870e8d6dfda19d859bd063b233;hp=f368515ce0aa5bcb7afca351a2a306cb92622f13;hpb=9e82b53fc5d8cb1e54b5fde774fa68a916f28b4c;p=timetracker.git diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index f368515c..295e4079 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 (!ttAccessAllowed('manage_custom_fields') || !$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()"');