Some more refactoring.
authorNik Okuntseff <support@anuko.com>
Thu, 5 Apr 2018 12:29:57 +0000 (12:29 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 5 Apr 2018 12:29:57 +0000 (12:29 +0000)
WEB-INF/templates/admin_group_add.tpl
WEB-INF/templates/footer.tpl
admin_group_add.php
admin_group_delete.php
admin_group_edit.php
admin_groups.php

index 364b599..fd671e9 100644 (file)
@@ -1,38 +1,38 @@
-{$forms.teamForm.open}
+{$forms.groupForm.open}
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
           <td align="right" nowrap>{$i18n.label.group_name}:</td>
-          <td>{$forms.teamForm.team_name.control}</td>
+          <td>{$forms.groupForm.group_name.control}</td>
         </tr>
         <tr>
            <td align="right" nowrap>{$i18n.label.language}:</td>
-           <td>{$forms.teamForm.lang.control}</td>
+           <td>{$forms.groupForm.lang.control}</td>
         </tr>
         <tr><td>&nbsp;</td></tr>
         <tr>
           <td align="right" nowrap>{$i18n.label.manager_name} (*):</td>
-          <td>{$forms.teamForm.manager_name.control}</td>
+          <td>{$forms.groupForm.manager_name.control}</td>
         </tr>
         <tr>
           <td align="right" nowrap>{$i18n.label.manager_login} (*):</td>
-          <td>{$forms.teamForm.manager_login.control}</td>
+          <td>{$forms.groupForm.manager_login.control}</td>
         </tr>
 {if !$auth_external}
         <tr>
           <td align="right" nowrap>{$i18n.label.password} (*):</td>
-          <td>{$forms.teamForm.password1.control}</td>
+          <td>{$forms.groupForm.password1.control}</td>
         </tr>
         <tr>
           <td align="right" nowrap>{$i18n.label.confirm_password} (*):</td>
-          <td>{$forms.teamForm.password2.control}</td>
+          <td>{$forms.groupForm.password2.control}</td>
         </tr>
 {/if}
         <tr>
           <td align="right" nowrap>{$i18n.label.email}:</td>
-          <td>{$forms.teamForm.manager_email.control}</td>
+          <td>{$forms.groupForm.manager_email.control}</td>
         </tr>
         <tr>
           <td></td>
         </tr>
         <tr><td colspan="2">&nbsp;</td></tr>
         <tr>
-          <td colspan="2" height="50" align="center">{$forms.teamForm.btn_submit.control}</td>
+          <td colspan="2" height="50" align="center">{$forms.groupForm.btn_submit.control}</td>
         </tr>
       </table>
     </td>
   </tr>
 </table>
-{$forms.teamForm.close}
+{$forms.groupForm.close}
index 5cc7edc..abe93b4 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.17.86.4227 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.86.4228 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 3684d6c..21570a9 100644 (file)
@@ -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');
index 48e60c3..476f504 100644 (file)
@@ -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);
index 317624a..8779bc9 100644 (file)
@@ -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);
index bccbb05..fa5f51b 100644 (file)
 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'));