From 5cb74fee0b3bf9f36c7b3f2c80ff49a473d2722f Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 30 Aug 2022 14:50:49 +0800 Subject: [PATCH] * Fix bug . --- module/caselib/css/showimport.css | 1 + module/caselib/view/showimport.html.php | 249 +++++++----------------- 2 files changed, 73 insertions(+), 177 deletions(-) diff --git a/module/caselib/css/showimport.css b/module/caselib/css/showimport.css index df3757a2cf..52b3ecab97 100644 --- a/module/caselib/css/showimport.css +++ b/module/caselib/css/showimport.css @@ -1 +1,2 @@ .table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;} +.c-pri {width: 100px}; diff --git a/module/caselib/view/showimport.html.php b/module/caselib/view/showimport.html.php index 30b341937b..46170f0fa3 100644 --- a/module/caselib/view/showimport.html.php +++ b/module/caselib/view/showimport.html.php @@ -1,32 +1,10 @@ -getModuleRoot() . 'common/view/header.html.php';?> -requiredFields; -$allCount = $datas->allCount; -$allPager = $datas->allPager; -$pagerID = $datas->pagerID; -$isEndPage = $datas->isEndPage; -$maxImport = $datas->maxImport; -$dataInsert = $datas->dataInsert; -$fields = $datas->fields; -$suhosinInfo = $datas->suhosinInfo; -$model = $datas->model; -$datas = $datas->datas; -?> - - + +
$this->config->file->maxImport):?>
-

port->import;?>

+

caselib->import;?>

file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?>

import, "id='import'", 'btn btn-primary');?>

@@ -38,197 +16,114 @@ $(function() { if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val()))); }); - $('#import').click(function() - { - $.cookie('maxImport', $('#maxImport').val()); - location.href = createLink('caselib', 'showImport', "libID=&pageID=1&maxImport=" + $('#maxImport').val()) - }); + $('#import').click(function(){location.href = createLink('caselib', 'showImport', "libID=&pageID=1&maxImport=" + $('#maxImport').val())}) }); -
-

port->import;?>

+

caselib->import;?>

-
+ - - - $value):?> - - - - + + + + + + + + - - - - - - - show) continue; - - $width = ($field->width && $field->width != 'auto' ? $field->width . 'px' : 'auto'); - $required = strpos(",$field->rules,", ",$notEmptyRule->id,") !== false ? 'required' : ''; - echo ""; - } - } - ?> - - $object):?> - - - $value):?> - - - - - - - - - - config->port->dateMatch;?> - $field)) $object->$field = ''; ?> - - - - - - - $field)?> - - - - - - - - - - - - - + + $case):?> + title)) continue;?> + id) and !isset($cases[$case->id])) $case->id = 0;?> + + '; - } + echo $case->id . html::hidden("id[$key]", $case->id); + $insert = false; } + else + { + echo $key . " {$lang->testcase->new}"; + } + echo html::hidden("lib[$key]", $libID); ?> - - + + + + + + + + + + + -
port->id?> + testcase->id?> testcase->title?> testcase->module?> testcase->pri?> testcase->type?> testcase->stage?> testcase->keywords?>testcase->precondition?> - - + +
testcase->stepDesc?>testcase->stepExpect?>
$field->name
- id)) - { - echo $object->id . html::hidden("id[$key]", $object->id); - $insert = false; - } - else - { - $sub = (strpos($object->title, '>') === 0) ? " {$lang->port->children}" : " {$lang->port->new}"; - echo $addID++ . $sub; - } - echo html::hidden("lib[$key]", $libID); - ?> - $field) ? $object->$field : '', "class='form-control chosen'")?>$field) ? $object->$field : '', "multiple class='form-control chosen'")?>$field) ? $object->$field : '', "class='form-control form-date autocomplete='off'")?>$field) ? $object->$field : '', "class='form-control form-datetime autocomplete='off'")?>$field, "class='form-control' cols='50' rows='1'")?> - - - - $desc):?> - - - - - - - - - - - - - - - -
- - - - - - - -
- -
$field) ? $object->$field : '', "class='form-control autocomplete='off'")?>
id)) { - $this->loadModel('flow'); - foreach($appendFields as $field) - { - if(!$field->show) continue; - $value = $field->defaultValue ? $field->defaultValue : zget($datas, $field->field, ''); - echo '' . $this->flow->buildControl($field, $value, "$field->field[$key]", true) . '
title, "class='form-control' style='margin-top:2px'")?>module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?>testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?>testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control chosen'")?>testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?>keywords) ? $case->keywords : "", "class='form-control'")?>precondition) ? htmlSpecialString($case->precondition) : "", "class='form-control'")?> + + + $desc):?> + + + + + + + +
+ +
+ lang->save : $this->lang->file->saveAndNext; - $isStartPage = $pagerID == 1 ? true : false; + $submitText = $isEndPage ? $this->lang->save : $this->lang->file->saveAndNext; if(!$insert and $dataInsert === '') { - echo ""; + echo ""; } else { - echo html::submitButton($submitText); - if($dataInsert !== '') echo html::hidden('insert', $dataInsert); + echo html::submitButton($submitText); + if($dataInsert !== '') echo html::hidden('insert', $dataInsert); } echo html::hidden('isEndPage', $isEndPage ? 1 : 0); echo html::hidden('pagerID', $pagerID); - echo '   ' . html::a("javascript:history.back(-1)", $lang->goback, '', "class='btn btn-back btn-wide'"); + echo '   ' . html::a($this->createLink('caselib', 'browse', "libID=$libID"), $lang->goback, '', 'class="btn btn-wide"'); echo '   ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager); ?>
- getModuleRoot() . 'common/view/noticeimport.html.php';?> +
- -getModuleRoot() . 'common/view/footer.html.php';?> + + + +