Exemple #1
0
 private function _getFieldSource($ext_id)
 {
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl->assign('path', $this->_TPL_PATH);
     $tpl->assign('ext_id', $ext_id);
     // [TODO] Make sure the extension exists before continuing
     $source_manifest = DevblocksPlatform::getExtension($ext_id, false);
     $tpl->assign('source_manifest', $source_manifest);
     $types = Model_CustomField::getTypes();
     $tpl->assign('types', $types);
     // Look up the defined global fields by the given extension
     $fields = DAO_CustomField::getBySourceAndGroupId($ext_id, 0);
     $tpl->assign('fields', $fields);
     $tpl->display('file:' . $this->_TPL_PATH . 'configuration/tabs/fields/edit_source.tpl');
 }
Exemple #2
0
 function showTabFieldsAction()
 {
     @($group_id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer', 0));
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = $this->_TPL_PATH;
     $tpl->assign('path', $tpl_path);
     $active_worker = CerberusApplication::getActiveWorker();
     if (!$active_worker->isTeamManager($group_id) && !$active_worker->is_superuser) {
         return;
     } else {
         $group = DAO_Group::getTeam($group_id);
         $tpl->assign('team', $group);
     }
     $group_fields = DAO_CustomField::getBySourceAndGroupId(ChCustomFieldSource_Ticket::ID, $group_id);
     $tpl->assign('group_fields', $group_fields);
     $types = Model_CustomField::getTypes();
     $tpl->assign('types', $types);
     $tpl->display('file:' . $tpl_path . 'groups/manage/fields.tpl');
 }