Refactoring in admin_group_edit files.
authorNik Okuntseff <support@anuko.com>
Thu, 5 Apr 2018 12:53:50 +0000 (12:53 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 5 Apr 2018 12:53:50 +0000 (12:53 +0000)
WEB-INF/templates/admin_group_edit.tpl
WEB-INF/templates/footer.tpl
admin_group_edit.php

index fb79204..4c52580 100644 (file)
@@ -1,34 +1,34 @@
-{$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>&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_save.control}&nbsp;{$forms.teamForm.btn_cancel.control}</td>
+          <td colspan="2" height="50" align="center">{$forms.groupForm.btn_save.control}&nbsp;{$forms.groupForm.btn_cancel.control}</td>
         </tr>
       </table>
     </td>
   </tr>
 </table>
-{$forms.teamForm.close}
+{$forms.groupForm.close}
index dc988c9..5dba9ff 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.4229 | 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.4230 | 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 8779bc9..a1157fb 100644 (file)
@@ -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');