X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=project_edit.php;h=542fb4647a7c4ba68677574d871a3e10081a16fa;hb=aeb30899d6ec142220d83b34fd8f6c68c05e8e90;hp=29c0d51b90f5bdcec2d4c317ded65f4f82ee7aa9;hpb=7797eda9fb04c217a813db88e00bb9ee541eabbb;p=timetracker.git diff --git a/project_edit.php b/project_edit.php index 29c0d51b..542fb464 100644 --- a/project_edit.php +++ b/project_edit.php @@ -36,7 +36,7 @@ if (!ttAccessAllowed('manage_projects')) { header('Location: access_denied.php'); exit(); } -if (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { +if (MODE_PROJECTS != $user->getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { header('Location: feature_disabled.php'); exit(); } @@ -85,7 +85,7 @@ $form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); $form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); -if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) +if (MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) $form->addInput(array('type'=>'checkboxgroup','name'=>'tasks','data'=>$all_tasks,'layout'=>'H','value'=>$cl_tasks)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); @@ -136,6 +136,8 @@ if ($request->isPost()) { } // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('show_users', count($users) > 0); +$smarty->assign('show_tasks', count($tasks) > 0); $smarty->assign('onload', 'onLoad="document.projectForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.edit_project')); $smarty->assign('content_page_name', 'project_edit.tpl');