From: Nik Okuntseff Date: Thu, 5 Apr 2018 12:53:50 +0000 (+0000) Subject: Refactoring in admin_group_edit files. X-Git-Tag: timetracker_1.19-1~872 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=09538ad1b33e506c716b09a8d55ec4f0ad8c4508;p=timetracker.git Refactoring in admin_group_edit files. --- diff --git a/WEB-INF/templates/admin_group_edit.tpl b/WEB-INF/templates/admin_group_edit.tpl index fb792045..4c52580e 100644 --- a/WEB-INF/templates/admin_group_edit.tpl +++ b/WEB-INF/templates/admin_group_edit.tpl @@ -1,34 +1,34 @@ -{$forms.teamForm.open} +{$forms.groupForm.open}
- + - + - + {if !$auth_external} - + - + {/if} - + @@ -36,10 +36,10 @@ - +
{$i18n.label.group_name}:{$forms.teamForm.team_name.control}{$forms.groupForm.group_name.control}
 
{$i18n.label.manager_name} (*):{$forms.teamForm.manager_name.control}{$forms.groupForm.manager_name.control}
{$i18n.label.manager_login} (*):{$forms.teamForm.manager_login.control}{$forms.groupForm.manager_login.control}
{$i18n.label.password} (*):{$forms.teamForm.password1.control}{$forms.groupForm.password1.control}
{$i18n.label.confirm_password} (*):{$forms.teamForm.password2.control}{$forms.groupForm.password2.control}
{$i18n.label.email}:{$forms.teamForm.manager_email.control}{$forms.groupForm.manager_email.control}
 
{$forms.teamForm.btn_save.control} {$forms.teamForm.btn_cancel.control}{$forms.groupForm.btn_save.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 dc988c90..5dba9ffa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.86.4229 | Copyright © Anuko | +  Anuko Time Tracker 1.17.86.4230 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/admin_group_edit.php b/admin_group_edit.php index 8779bc98..a1157fbe 100644 --- a/admin_group_edit.php +++ b/admin_group_edit.php @@ -39,10 +39,10 @@ if (!ttAccessAllowed('administer_site')) { // End of access checks. $group_id = $request->getParameter('id'); -$team_details = ttTeamHelper::getTeamDetails($group_id); +$group_details = ttTeamHelper::getTeamDetails($group_id); if ($request->isPost()) { - $cl_team_name = trim($request->getParameter('team_name')); + $cl_group_name = trim($request->getParameter('group_name')); $cl_manager_name = trim($request->getParameter('manager_name')); $cl_manager_login = trim($request->getParameter('manager_login')); if (!$auth->isPasswordExternal()) { @@ -51,17 +51,17 @@ if ($request->isPost()) { } $cl_manager_email = trim($request->getParameter('manager_email')); } else { - $cl_team_name = $team_details['team_name']; - $cl_manager_name = $team_details['manager_name']; - $cl_manager_login = $team_details['manager_login']; + $cl_group_name = $group_details['team_name']; + $cl_manager_name = $group_details['manager_name']; + $cl_manager_login = $group_details['manager_login']; if (!$auth->isPasswordExternal()) { $cl_password1 = $cl_password2 = ''; } - $cl_manager_email = $team_details['manager_email']; + $cl_manager_email = $group_details['manager_email']; } -$form = new Form('teamForm'); -$form->addInput(array('type'=>'text','maxlength'=>'80','name'=>'team_name','value'=>$cl_team_name)); +$form = new Form('groupForm'); +$form->addInput(array('type'=>'text','maxlength'=>'80','name'=>'group_name','value'=>$cl_group_name)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_name','value'=>$cl_manager_name)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_login','value'=>$cl_manager_login)); if (!$auth->isPasswordExternal()) { @@ -77,11 +77,11 @@ if ($request->isPost()) { if ($request->getParameter('btn_save')) { // Create fields array for ttAdmin instance. $fields = array( - 'old_group_name' => $team_details['team_name'], - 'new_group_name' => $cl_team_name, - 'user_id' => $team_details['manager_id'], + 'old_group_name' => $group_details['team_name'], + 'new_group_name' => $cl_group_name, + 'user_id' => $group_details['manager_id'], 'user_name' => $cl_manager_name, - 'old_login' => $team_details['manager_login'], + 'old_login' => $group_details['manager_login'], 'new_login' => $cl_manager_login, 'password1' => $cl_password1, 'password2' => $cl_password2, @@ -104,7 +104,7 @@ if ($request->isPost()) { $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.teamForm.manager_name.focus()"'); +$smarty->assign('onload', 'onLoad="document.groupForm.manager_name.focus()"'); $smarty->assign('title', $i18n->get('title.edit_group')); $smarty->assign('content_page_name', 'admin_group_edit.tpl'); $smarty->display('index.tpl');