예제 #1
0
 function edit(&$argsObj, &$otCfg, $oWebEditorKeys)
 {
     $guiObj = $this->initGuiBean($argsObj);
     $otCfg->to->map = $this->tcaseMgr->get_keywords_map($argsObj->tcase_id, array('orderByClause' => " ORDER BY keyword ASC "));
     keywords_opt_transf_cfg($otCfg, $argsObj->assigned_keywords_list);
     $tc_data = $this->tcaseMgr->get_by_id($argsObj->tcase_id, $argsObj->tcversion_id);
     foreach ($oWebEditorKeys as $key) {
         $guiObj->{$key} = isset($tc_data[0][$key]) ? $tc_data[0][$key] : '';
         $argsObj->{$key} = $guiObj->{$key};
     }
     $cf_smarty = null;
     $cfPlaces = $this->tcaseMgr->buildCFLocationMap();
     foreach ($cfPlaces as $locationKey => $locationFilter) {
         $cf_smarty[$locationKey] = $this->tcaseMgr->html_table_of_custom_field_inputs($argsObj->tcase_id, null, 'design', '', $argsObj->tcversion_id, null, null, $locationFilter);
     }
     $templateCfg = templateConfiguration('tcEdit');
     $guiObj->cf = $cf_smarty;
     $guiObj->tc = $tc_data[0];
     $guiObj->opt_cfg = $otCfg;
     $guiObj->cancelActionJS = 'location.href=fRoot+' . "'" . "lib/testcases/archiveData.php?version_id=" . $argsObj->tcversion_id . '&edit=testcase&id=' . intval($argsObj->tcase_id) . "'";
     $guiObj->template = $templateCfg->default_template;
     return $guiObj;
 }
예제 #2
0
 function edit(&$argsObj, &$otCfg, $oWebEditorKeys)
 {
     $guiObj = $this->initGuiBean($argsObj);
     $otCfg->to->map = $this->tcaseMgr->get_keywords_map($argsObj->tcase_id, " ORDER BY keyword ASC ");
     keywords_opt_transf_cfg($otCfg, $argsObj->assigned_keywords_list);
     $tc_data = $this->tcaseMgr->get_by_id($argsObj->tcase_id, $argsObj->tcversion_id);
     foreach ($oWebEditorKeys as $key) {
         $guiObj->{$key} = isset($tc_data[0][$key]) ? $tc_data[0][$key] : '';
         $argsObj->{$key} = $guiObj->{$key};
     }
     $cf_smarty = null;
     $cfPlaces = $this->tcaseMgr->buildCFLocationMap();
     foreach ($cfPlaces as $locationKey => $locationFilter) {
         $cf_smarty[$locationKey] = $this->tcaseMgr->html_table_of_custom_field_inputs($argsObj->tcase_id, null, 'design', '', $argsObj->tcversion_id, null, null, $locationFilter);
     }
     $templateCfg = templateConfiguration('tcEdit');
     $guiObj->cf = $cf_smarty;
     $guiObj->tc = $tc_data[0];
     $guiObj->opt_cfg = $otCfg;
     $guiObj->template = $templateCfg->default_template;
     return $guiObj;
 }
예제 #3
0
     }
     $gui = initializeGui($tsuite_mgr, $args->testsuiteID, $args, $l18n);
     $tsuite_mgr->show($smarty, $gui, $template_dir, $args->testsuiteID, null, $msg);
     break;
 case 'add_testsuite':
     $messages = null;
     $op['status'] = 0;
     if ($name_ok) {
         $op = addTestSuite($tsuite_mgr, $args, $c_data, $_REQUEST);
         $messages = array('result_msg' => $op['messages']['msg'], 'user_feedback' => $op['messages']['user_feedback']);
     }
     // $userInput is used to maintain data filled by user if there is
     // a problem with test suite name.
     $userInput = $op['status'] ? null : $_REQUEST;
     $assignedKeywords = $op['status'] ? "" : $args->assigned_keyword_list;
     keywords_opt_transf_cfg($opt_cfg, $assignedKeywords);
     $smarty->assign('opt_cfg', $opt_cfg);
     $gui = new stdClass();
     $gui->containerType = $level;
     $gui->refreshTree = $args->refreshTree;
     $gui->cancelActionJS = 'location.href=fRoot+' . "'lib/testcases/archiveData.php?id=" . intval($args->containerID);
     switch ($level) {
         case 'testproject':
             $gui->cancelActionJS .= "&edit=testproject&level=testproject'";
             break;
         case 'testsuite':
             $gui->cancelActionJS .= "&edit=testsuite&level=testsuite&containerType=testsuite'";
             break;
     }
     $smarty->assign('level', $level);
     $smarty->assign('gui', $gui);
예제 #4
0
        $tcData = $tcase_mgr->get_by_id($args->id);
        if (sizeof($tcData)) {
            $tcData = $tcData[0];
            $keyword_assignment_subtitle = lang_get('test_case') . TITLE_SEP . $tcData['name'];
        }
        if ($args->bAssignTestCase) {
            $result = 'ok';
            $tcase_mgr->setKeywords($args->id, $args->keywordArray);
            $itemID = $args->id;
        }
    }
}
if ($itemID) {
    $opt_cfg->to->map = $tcase_mgr->get_keywords_map($itemID, " ORDER BY keyword ASC ");
}
keywords_opt_transf_cfg($opt_cfg, $args->keywordList);
$smarty->assign('can_do', $can_do);
$smarty->assign('sqlResult', $result);
$smarty->assign('data', $args->id);
$smarty->assign('level', $args->edit);
$smarty->assign('opt_cfg', $opt_cfg);
$smarty->assign('keyword_assignment_subtitle', $keyword_assignment_subtitle);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
function init_args(&$opt_cfg)
{
    $rl_html_name = $opt_cfg->js_ot_name . "_newRight";
    $iParams = array("id" => array(tlInputParameter::INT_N), "edit" => array(tlInputParameter::STRING_N, 0, 100), "assigntestcase" => array(tlInputParameter::STRING_N, 0, 1), "assigntestsuite" => array(tlInputParameter::STRING_N, 0, 1), $rl_html_name => array(tlInputParameter::STRING_N));
    $pParams = R_PARAMS($iParams);
    $args = new stdClass();
    $args->id = $pParams["id"];
    $args->keywordArray = null;