Exemplo n.º 1
0
    // Removing duplicate and NULL id's
    unset($userid_array['']);
    $userSet = null;
    if ($userid_array) {
        foreach ($userid_array as $value) {
            $userSet[] = $value;
        }
    }
    smarty_assign_tsuite_info($smarty, $_REQUEST, $db, $tree_mgr, $tcase_id, $args->tproject_id);
    // Bulk is possible when test suite is selected (and is allowed in config)
    if ($gui->can_use_bulk_op = $args->level == 'testsuite') {
        $xx = current($gui->execution_time_cfields);
        $gui->execution_time_cfields = null;
        $gui->execution_time_cfields[0] = $xx;
    }
    initWebEditors($gui, $cfg, $_SESSION['basehref']);
    // To silence smarty errors
    //  future must be initialized in a right way
    $smarty->assign('test_automation_enabled', 0);
    $smarty->assign('gui', $gui);
    $smarty->assign('cfg', $cfg);
    $smarty->assign('users', tlUser::getByIDs($db, $userSet, 'id'));
    $smarty->display($templateCfg->template_dir . $templateCfg->default_template);
}
/*
  function: 

  args:
  
  returns: 
  
Exemplo n.º 2
0
        $the_tpl = isset($a_tpl[$the_key]) ? $a_tpl[$the_key] : null;
        $init_opt_transfer = isset($a_init_opt_transfer[$the_key]) ? 1 : 0;
        $action = $the_key;
        $get_c_data = $the_val;
        $level = is_null($level) ? 'testsuite' : $level;
        break;
    }
}
$args->action = $action;
$smarty->assign('level', $level);
$smarty->assign('page_title', lang_get('container_title_' . $level));
if ($init_opt_transfer) {
    $opt_cfg = initializeOptionTransfer($tproject_mgr, $tsuite_mgr, $args, $action);
}
// create  web editor objects
list($oWebEditor, $webEditorHtmlNames, $webEditorTemplateKey) = initWebEditors($action, $level, $editorCfg);
if ($get_c_data) {
    $name_ok = 1;
    $c_data = getValuesFromPost($webEditorHtmlNames);
    if ($name_ok && !check_string($c_data['container_name'], $g_ereg_forbidden)) {
        $msg = $l18n['string_contains_bad_chars'];
        $name_ok = 0;
    }
    if ($name_ok && $c_data['container_name'] == "") {
        $msg = $l18n['warning_empty_testsuite_name'];
        $name_ok = 0;
    }
}
switch ($action) {
    case 'fileUpload':
        switch ($level) {
Exemplo n.º 3
0
function renderTestSuiteForManagement(&$tplEngine, &$argsObj, &$guiObj, &$tsuiteMgr, $keywordSet, $userInput = null)
{
    $guiObj->optionTransfer = tlKeyword::optionTransferGuiControl();
    $guiObj->optionTransfer->setNewRightInputName('assigned_keyword_list');
    $guiObj->optionTransfer->initFromPanel(null, lang_get('available_kword'));
    $guiObj->optionTransfer->initToPanel(null, lang_get('assigned_kword'));
    $guiObj->optionTransfer->setFromPanelContent($keywordSet['testproject']);
    $guiObj->optionTransfer->setToPanelContent($keywordSet['testsuite']);
    $guiObj->optionTransfer->updatePanelsContent($argsObj->assigned_keyword_list);
    $guiObj->optionTransferJSObject = json_encode($guiObj->optionTransfer->getHtmlInputNames());
    $context = array('tproject_id' => $argsObj->tproject_id, 'parent_id' => $argsObj->containerID, 'id' => $argsObj->testsuiteID);
    $editorsObj = initWebEditors();
    $tsuiteMgr->viewer_edit_new($tplEngine, $guiObj, $argsObj->action, $context, $editorsObj, null, $userInput);
}