$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
 *
 */
function init_args()
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $args = new stdClass();
    $key2search = array('doAction', 'cfield', 'display_order', 'location', 'hidden_active_cfield', 'active_cfield');