Made display of projects conditional on user_add.php and user_edit.php.
authorNik Okuntseff <support@anuko.com>
Mon, 26 Nov 2018 17:42:30 +0000 (17:42 +0000)
committerNik Okuntseff <support@anuko.com>
Mon, 26 Nov 2018 17:42:30 +0000 (17:42 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/user_add.tpl
WEB-INF/templates/user_edit.tpl
user_add.php
user_edit.php

index fe920a0..4094908 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.18.28.4524 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.28.4525 | 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 762f052..29218d8 100644 (file)
@@ -81,15 +81,17 @@ function handleClientControl() {
       <td align="right">{$i18n.form.users.default_rate}&nbsp;(0{$user->getDecimalMark()}00):</td>
       <td>{$forms.userForm.rate.control}</td>
     </tr>
-{if ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode())}
+{if ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) && $show_projects}
+    <tr><td>&nbsp;</td></tr>
     <tr valign="top">
       <td align="right">{$i18n.label.projects}:</td>
       <td>{$forms.userForm.projects.control}</td>
     </tr>
+{/if}
     <tr>
       <td colspan="2" align="center">{$i18n.label.required_fields}</td>
     </tr>
-{/if}
+
     <tr>
       <td colspan="2" align="center" height="50">{$forms.userForm.btn_submit.control}</td>
     </tr>
index a0872a1..0c24a01 100644 (file)
@@ -115,7 +115,8 @@ function handleClientControl() {
       <td align="right">{$i18n.form.users.default_rate}&nbsp;(0{$user->getDecimalMark()}00):</td>
       <td>{$forms.userForm.rate.control}</td>
     </tr>
-{if ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode())}
+{if ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) && $show_projects}
+    <tr><td>&nbsp;</td></tr>
     <tr valign="top">
       <td align="right">{$i18n.label.projects}:</td>
       <td>{$forms.userForm.projects.control}</td>
index bc78adb..7fb6ea3 100644 (file)
@@ -169,6 +169,7 @@ if ($request->isPost()) {
 $smarty->assign('auth_external', $auth->isPasswordExternal());
 $smarty->assign('active_roles', $active_roles);
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
+$smarty->assign('show_projects', count($projects) > 0);
 $smarty->assign('onload', 'onLoad="document.userForm.name.focus();handleClientControl();"');
 $smarty->assign('title', $i18n->get('title.add_user'));
 $smarty->assign('content_page_name', 'user_add.tpl');
index 26dfa01..c1c9e6c 100644 (file)
@@ -227,6 +227,7 @@ $smarty->assign('rates', $rates);
 $smarty->assign('auth_external', $auth->isPasswordExternal());
 $smarty->assign('active_roles', $active_roles);
 $smarty->assign('can_swap', $can_swap);
+$smarty->assign('show_projects', count($projects) > 0);
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('onload', 'onLoad="document.userForm.name.focus();handleClientControl();"');
 $smarty->assign('user_id', $user_id);