// updateGroup updates group information with new data.
function updateGroup($fields) {
- if (!($this->can('manage_basic_settings') ||
- $this->can('manage_advanced_settings') ||
- $this->can('manage_features'))) return false;
- // TODO: update the above for subgroup updates.
+ $mdb2 = getConnection();
$group_id = $fields['group_id'];
if ($group_id && !$this->isGroupValid($group_id)) return false;
-
- $mdb2 = getConnection();
if (!$group_id) $group_id = $this->getGroup();
if (isset($fields['name'])) $name_part = ', name = '.$mdb2->quote($fields['name']);
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4607 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4608 | Copyright © <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>
<td align="right">{$i18n.label.client} (*):</td>
<td>{$forms.invoiceForm.client.control}</td>
</tr>
-{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+{if $show_project}
<tr>
<td align="right">{$i18n.label.project}:</td>
<td>{$forms.invoiceForm.project.control}</td>
$form->addInput(array('type'=>'combobox','name'=>'client','style'=>'width: 250px;','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select'))));
}
// Dropdown for projects.
-if (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) {
+$show_project = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode();
+if ($show_project) {
$projects = ttGroupHelper::getActiveProjects();
$form->addInput(array('type'=>'combobox','name'=>'project','style'=>'width: 250px;','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all'))));
}
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="document.invoiceForm.number.focus()"');
+$smarty->assign('show_project', $show_project);
$smarty->assign('title', $i18n->get('title.add_invoice'));
$smarty->assign('content_page_name', 'invoice_add.tpl');
$smarty->display('index.tpl');
exit();
}
-$cl_lock_spec = $request->isPost() ? $request->getParameter('lock_spec') : $user->lock_spec;
+$cl_lock_spec = $request->isPost() ? $request->getParameter('lock_spec') : $user->getLockSpec();
$form = new Form('lockingForm');
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'lock_spec','style'=>'width: 250px;','value'=>$cl_lock_spec));