<td align="right">{$i18n.label.thing_name} (*):</td>
<td>{$forms.fieldForm.name.control}</td>
</tr>
+ <tr>
+ <td align="right">{$i18n.label.entity}:</td>
+ <td>{$forms.fieldForm.entity.control} <a href="https://www.anuko.com/lp/tt_39.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
+ </tr>
<tr>
<td align="right">{$i18n.label.type}:</td>
<td>{$forms.fieldForm.type.control}</td>
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.19.7.5023 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.19.7.5024 | 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>
if ($err->no()) {
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$field['label']));
$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
+
+ // TODO: consider encapsulating this block in a function.
+ $entity_type = $field['entity_type'];
+ if (CustomFields::ENTITY_TIME == $entity_type)
+ $entity = $i18n->get('entity.time');
+ else if (CustomFields::ENTITY_USER == $entity_type)
+ $entity = $i18n->get('entity.user');
+ else if (CustomFields::ENTITY_PROJECT == $entity_type)
+ $entity = $i18n->get('entity.project');
+ $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'entity','value'=>$entity,'enable'=>false));
+
$form->addInput(array('type'=>'combobox','name'=>'type','value'=>$field['type'],
'data'=>array(CustomFields::TYPE_TEXT=>$i18n->get('label.type_text'),
CustomFields::TYPE_DROPDOWN=>$i18n->get('label.type_dropdown'))));
$group_id = $user->getGroup();
$org_id = $user->org_id;
- $sql = "select label, type, required from tt_custom_fields".
+ $sql = "select label, entity_type, type, required from tt_custom_fields".
" where id = $id and group_id = $group_id and org_id = $org_id";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {