From: Nik Okuntseff Date: Thu, 5 Apr 2018 12:29:57 +0000 (+0000) Subject: Some more refactoring. X-Git-Tag: timetracker_1.19-1~874 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=de79fff47f10297d7df2edf34aa6420de71cde5b;p=timetracker.git Some more refactoring. --- diff --git a/WEB-INF/templates/admin_group_add.tpl b/WEB-INF/templates/admin_group_add.tpl index 364b599b..fd671e9c 100644 --- a/WEB-INF/templates/admin_group_add.tpl +++ b/WEB-INF/templates/admin_group_add.tpl @@ -1,38 +1,38 @@ -{$forms.teamForm.open} +{$forms.groupForm.open}
- + - + - + - + {if !$auth_external} - + - + {/if} - + @@ -40,10 +40,10 @@ - +
{$i18n.label.group_name}:{$forms.teamForm.team_name.control}{$forms.groupForm.group_name.control}
{$i18n.label.language}:{$forms.teamForm.lang.control}{$forms.groupForm.lang.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_submit.control}{$forms.groupForm.btn_submit.control}
-{$forms.teamForm.close} +{$forms.groupForm.close} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5cc7edc4..abe93b44 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.86.4227 | Copyright © Anuko | +  Anuko Time Tracker 1.17.86.4228 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/admin_group_add.php b/admin_group_add.php index 3684d6cd..21570a96 100644 --- a/admin_group_add.php +++ b/admin_group_add.php @@ -31,14 +31,15 @@ import('form.Form'); import('ttUserHelper'); import('ttRoleHelper'); -// Access check. +// Access checks. if (!ttAccessAllowed('administer_site')) { header('Location: access_denied.php'); exit(); } +// End of access checks. if ($request->isPost()) { - $cl_team_name = trim($request->getParameter('team_name')); + $cl_group_name = trim($request->getParameter('group_name')); $cl_lang = $request->getParameter('lang'); $cl_manager_name = trim($request->getParameter('manager_name')); $cl_manager_login = trim($request->getParameter('manager_login')); @@ -50,8 +51,8 @@ if ($request->isPost()) { } else $cl_lang = $i18n->lang; // Browser setting from initialize.php. -$form = new Form('teamForm'); -$form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','value'=>$cl_team_name)); +$form = new Form('groupForm'); +$form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'group_name','value'=>$cl_group_name)); // Prepare an array of available languages. $lang_files = I18n::getLangFileList(); @@ -97,7 +98,7 @@ if ($request->isPost()) { 'password1' => $cl_password1, 'password2' => $cl_password2, 'email' => $cl_manager_email, - 'group_name' => $cl_team_name, + 'group_name' => $cl_group_name, 'currency' => CURRENCY_DEFAULT, 'lang' => $cl_lang); @@ -114,7 +115,7 @@ if ($request->isPost()) { $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.teamForm.team.focus()"'); +$smarty->assign('onload', 'onLoad="document.groupForm.group_name.focus()"'); $smarty->assign('content_page_name', 'admin_group_add.tpl'); $smarty->assign('title', $i18n->get('title.create_group')); $smarty->display('index.tpl'); diff --git a/admin_group_delete.php b/admin_group_delete.php index 48e60c31..476f5048 100644 --- a/admin_group_delete.php +++ b/admin_group_delete.php @@ -30,11 +30,12 @@ require_once('initialize.php'); import('form.Form'); import('ttTeamHelper'); -// Access check. +// Access checks. if (!ttAccessAllowed('administer_site')) { header('Location: access_denied.php'); exit(); } +// End of access checks. $group_id = (int)$request->getParameter('id'); $team_details = ttTeamHelper::getTeamDetails($group_id); diff --git a/admin_group_edit.php b/admin_group_edit.php index 317624ab..8779bc98 100644 --- a/admin_group_edit.php +++ b/admin_group_edit.php @@ -31,11 +31,12 @@ import('form.Form'); import('ttUserHelper'); import('ttTeamHelper'); -// Access check. +// Access checks. if (!ttAccessAllowed('administer_site')) { header('Location: access_denied.php'); exit(); } +// End of access checks. $group_id = $request->getParameter('id'); $team_details = ttTeamHelper::getTeamDetails($group_id); diff --git a/admin_groups.php b/admin_groups.php index bccbb058..fa5f51b2 100644 --- a/admin_groups.php +++ b/admin_groups.php @@ -29,11 +29,12 @@ require_once('initialize.php'); import('ttGroupHelper'); -// Access check. +// Access checks. if (!ttAccessAllowed('administer_site')) { header('Location: access_denied.php'); exit(); } +// End of access checks. $smarty->assign('teams', ttGroupHelper::getTopGroups()); $smarty->assign('title', $i18n->get('title.groups'));