X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_add.php;h=273d761efc7a8cf5c8040a5487141fdf34cab947;hb=e3cdaaf8e6b4e5433ec620396e562de1a5dcec10;hp=e29de2eb6557dbcca28df09462d175891f5df340;hpb=11868a92089a10db070993b89e595f45fac3f6ff;p=timetracker.git diff --git a/invoice_add.php b/invoice_add.php index e29de2eb..273d761e 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -61,7 +61,8 @@ if ($user->isPluginEnabled('cl')) { $form->addInput(array('type'=>'combobox','name'=>'client','style'=>'width: 250px;','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select')))); } // Dropdown for projects. -if (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) { +$show_project = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); +if ($show_project) { $projects = ttGroupHelper::getActiveProjects(); $form->addInput(array('type'=>'combobox','name'=>'project','style'=>'width: 250px;','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -100,6 +101,7 @@ if ($request->isPost()) { $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.invoiceForm.number.focus()"'); +$smarty->assign('show_project', $show_project); $smarty->assign('title', $i18n->get('title.add_invoice')); $smarty->assign('content_page_name', 'invoice_add.tpl'); $smarty->display('index.tpl');