* Prompt to overwrite or insert completely.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The yyy view file of xxx module of ZenTaoPMS.
|
||||
* The notice view file of common 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 Tingting Dai <daitingting@easycorp.ltd>
|
||||
* @package xxx
|
||||
* @package common
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
@@ -56,7 +56,11 @@ window.submitForm = function(type)
|
||||
{
|
||||
$('#insert').val(type == 'insert' ? 1 : 0);
|
||||
$('#importNoticeModal .modal-footer .btn').addClass('disabled');
|
||||
$("button[data-target='#importNoticeModal']").closest('form')[0].submit();
|
||||
|
||||
const formUrl = $("button[data-target='#importNoticeModal']").closest('form').attr('action');
|
||||
const formData = new FormData($("button[data-target='#importNoticeModal']").closest('form')[0]);
|
||||
|
||||
$.ajaxSubmit({url: formUrl, data: formData});
|
||||
}
|
||||
|
||||
window.enableSubmitButton = function()
|
||||
|
||||
@@ -170,7 +170,7 @@ else
|
||||
input(set::className('hidden'), set::name('isEndPage'), set::value($isEndPage ? '1' : '0')),
|
||||
input(set::className('hidden'), set::name('pagerID'), set::value($pagerID)),
|
||||
input(set::className('hidden'), set::name('insert'), set::value($dataInsert)),
|
||||
(!$insert && $dataInsert === '') ? set::actions(array(array('text' => $submitText, 'data-toggle' => 'modal', 'data-target' => '#importNoticeModal', 'class' => 'primary showNotice'), 'cancel')) : null
|
||||
(!$insert && $dataInsert === '') ? set::actions(array(array('text' => $submitText, 'data-toggle' => 'modal', 'data-target' => '#importNoticeModal', 'class' => 'primary showNotice'), 'cancel')) : set::submitBtnText($submitText)
|
||||
);
|
||||
|
||||
if(!$insert && $dataInsert === '') include '../../common/ui/noticeimport.html.php';
|
||||
|
||||
@@ -1120,7 +1120,9 @@ class testcaseZen extends testcase
|
||||
$this->view->maxImport = $maxImport;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branch = $branch;
|
||||
return print($this->display());
|
||||
|
||||
$this->display();
|
||||
exit;
|
||||
}
|
||||
|
||||
$allPager = ceil($allCount / $maxImport);
|
||||
|
||||
Reference in New Issue
Block a user