X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/3b3e56c2f4e2a9624f0e25b1d5b0892a421a00bd..3d2723cd9a817f59b26a40f5b34281e0586ba1ca:/time.php diff --git a/time.php b/time.php index f7b1c12e..dd219e8e 100644 --- a/time.php +++ b/time.php @@ -249,6 +249,22 @@ if ($custom_fields && $custom_fields->fields[0]) { } } +// If we have templates, add a dropdown to select one. +if ($user->isPluginEnabled('tp')){ + $templates = ttGroupHelper::getActiveTemplates(); + if (count($templates) >= 1) { + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillNote(this.value);', + 'name'=>'template', + 'style'=>'width: 250px;', + 'data'=>$templates, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $smarty->assign('template_dropdown', 1); + $smarty->assign('templates', $templates); + } +} + // Submit. if ($request->isPost()) { if ($request->getParameter('btn_submit')) {