X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/f58ab716cb0cc4b8be8e48723b345bfab29697a6..c0f56fa7d299a4261fc77ba16b9d8f5a027b499f:/project_edit.php 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');