From e5af7e8b92762ab25710235c72c5504de2e091c6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 5 Apr 2018 12:44:09 +0000 Subject: [PATCH] Refactoring in admin_group_delete.php and .tpl. --- WEB-INF/templates/admin_group_delete.tpl | 10 +++++----- WEB-INF/templates/footer.tpl | 2 +- admin_group_delete.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/WEB-INF/templates/admin_group_delete.tpl b/WEB-INF/templates/admin_group_delete.tpl index a8b0712f..57164d4a 100644 --- a/WEB-INF/templates/admin_group_delete.tpl +++ b/WEB-INF/templates/admin_group_delete.tpl @@ -1,20 +1,20 @@ -{$forms.teamForm.open} +{$forms.groupForm.open}
- + - - + +
{$team_to_delete|escape}{$group_to_delete|escape}
 
{$forms.teamForm.btn_delete.control}  {$forms.teamForm.btn_cancel.control}{$forms.groupForm.btn_delete.control}  {$forms.groupForm.btn_cancel.control}
-{$forms.teamForm.close} +{$forms.groupForm.close} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index abe93b44..dc988c90 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.86.4228 | Copyright © Anuko | +  Anuko Time Tracker 1.17.86.4229 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/admin_group_delete.php b/admin_group_delete.php index 476f5048..418b7fbb 100644 --- a/admin_group_delete.php +++ b/admin_group_delete.php @@ -38,10 +38,10 @@ if (!ttAccessAllowed('administer_site')) { // End of access checks. $group_id = (int)$request->getParameter('id'); -$team_details = ttTeamHelper::getTeamDetails($group_id); -$team_name = $team_details['team_name']; +$group_details = ttTeamHelper::getTeamDetails($group_id); // TODO: refactor this. +$group_name = $group_details['team_name']; -$form = new Form('teamForm'); +$form = new Form('groupForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$group_id)); $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); @@ -64,7 +64,7 @@ if ($request->isPost()) { } } // isPost -$smarty->assign('team_to_delete', $team_name); +$smarty->assign('group_to_delete', $group_name); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_group')); $smarty->assign('content_page_name', 'admin_group_delete.tpl'); -- 2.20.1