Files
EasySoft-ZenTaoPMS/module/testcase/ui/create.html.php
T
2024-01-18 16:15:38 +08:00

38 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
/**
* The create file of bug module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yuting Wang<wangyuting@easycorp.ltd>
* @package bug
* @link https://www.zentao.net
*/
namespace zin;
jsVar('tab', $this->app->tab);
if($app->tab == 'execution') jsVar('objectID', $executionID);
if($app->tab == 'project') jsVar('objectID', $projectID);
if($app->tab == 'qa') jsVar('objectID', 0);
unset($lang->testcase->typeList['unit']);
$fields = useFields('testcase.create');
$fields->autoLoad('product', 'product,branch,module,story,scene')
->autoLoad('branch', 'module,story,scene')
->autoLoad('module', 'story,scene');
formGridPanel
(
set::modeSwitcher(false),
set::title($lang->testcase->create),
set::fields($fields),
set::loadUrl(helper::createLink('testcase', 'create', "productID={product}&branch={branch}&moduleID={module}")),
!empty($gobackLink) ? set::backUrl($gobackLink) : null,
on::change('#scriptFile', 'readScriptContent'),
on::change('#scriptFile', 'hideUploadScriptBtn'),
on::change('#story', 'changeStory'),
on::click('#auto', 'checkScript'),
on::click('.autoScript .file-delete', 'showUploadScriptBtn')
);