}
            if (!is_null($active)) {
                $cfield_mgr->set_active_for_testproject($args->testproject_id, $active, 1);
            }
            if (!is_null($inactive)) {
                $cfield_mgr->set_active_for_testproject($args->testproject_id, $inactive, 0);
            }
        }
        break;
}
// Get all available custom fields
$cfield_map = $cfield_mgr->get_all();
$gui = new stdClass();
$gui->locations = createLocationsMenu($cfield_mgr->getLocations());
$gui->tproject_name = $args->testproject_name;
$gui->my_cf = $cfield_mgr->get_linked_to_testproject($args->testproject_id);
$cf2exclude = is_null($gui->my_cf) ? null : array_keys($gui->my_cf);
$gui->other_cf = $cfield_mgr->get_all($cf2exclude);
$gui->cf_available_types = $cfield_mgr->get_available_types();
$gui->cf_allowed_nodes = array();
$allowed_nodes = $cfield_mgr->get_allowed_nodes();
foreach ($allowed_nodes as $verbose_type => $type_id) {
    $gui->cf_allowed_nodes[$type_id] = lang_get($verbose_type);
}
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
/**
 * create object with all user inputs
 *
 */