X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/265754c2f6e9d016e7f58591f08fe4e97f96b05d..98f5feaaf9bbf59fcf6e797c6c05978ef13074f6:/templates.php diff --git a/templates.php b/templates.php new file mode 100644 index 00000000..e2d0e779 --- /dev/null +++ b/templates.php @@ -0,0 +1,61 @@ +isPluginEnabled('tp')) { + header('Location: feature_disabled.php'); + exit(); +} +// End of access checks. + +$form = new Form('templatesForm'); + +if ($request->isPost()) { + if ($request->getParameter('btn_add')) { + // The Add button clicked. Redirect to template_add.php page. + header('Location: template_add.php'); + exit(); + } +} else { + $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); + $predefinedExpenses = ttGroupHelper::getPredefinedExpenses(); +} + +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('predefined_expenses', $predefinedExpenses); +$smarty->assign('title', $i18n->get('title.templates')); +$smarty->assign('content_page_name', 'templates.tpl'); +$smarty->display('index.tpl');