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'))); $activeTemplates = ttGroupHelper::getActiveTemplates(); $inactiveTemplates = ttGroupHelper::getInactiveTemplates(); } $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('active_templates', $activeTemplates); $smarty->assign('inactive_templates', $inactiveTemplates); $smarty->assign('title', $i18n->get('title.templates')); $smarty->assign('content_page_name', 'templates.tpl'); $smarty->display('index.tpl');