From 06f30a5944c3c3912ea15746ef3b23c8d462aaf2 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Fri, 18 Jul 2025 07:28:36 +0000 Subject: [PATCH] * [misc] modify field default value. --- db/update21.7.3.sql | 4 ++-- db/zentao.sql | 2 +- lib/zin/wg/deliverable/v1.php | 3 ++- module/doc/config/form.php | 4 ++-- module/doc/js/setdocbasic.ui.js | 2 +- module/doc/lang/de.php | 4 ++-- module/doc/lang/en.php | 4 ++-- module/doc/lang/fr.php | 4 ++-- module/doc/lang/zh-cn.php | 4 ++-- module/doc/ui/setdocbasic.template.html.php | 6 +++--- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/db/update21.7.3.sql b/db/update21.7.3.sql index df0dd7e721..8589dccbee 100644 --- a/db/update21.7.3.sql +++ b/db/update21.7.3.sql @@ -70,7 +70,7 @@ WHERE `bug`.`identify` != 0 AND `object`.`category` NOT IN ('HLDS', 'DDS', 'DBDS UPDATE `zt_bug` SET `injection` = '' WHERE `injection` = '0'; UPDATE `zt_bug` SET `identify` = '' WHERE `identify` = '0'; -ALTER TABLE `zt_doc` ADD `isDeliverable` char(10) NOT NULL DEFAULT 'no' AFTER `acl`; +ALTER TABLE `zt_doc` ADD `isDeliverable` char(10) NOT NULL DEFAULT '0' AFTER `acl`; ALTER TABLE `zt_deliverable` CHANGE `module` `module` mediumint(8) unsigned NOT NULL DEFAULT '0'; ALTER TABLE `zt_deliverable` ADD `workflowGroup` int(8) NOT NULL DEFAULT '0' AFTER `id`; ALTER TABLE `zt_deliverable` ADD `activity` int(8) unsigned NOT NULL DEFAULT '0' AFTER `name`; @@ -86,4 +86,4 @@ CREATE TABLE IF NOT EXISTS `zt_deliverablestage` ( `required` varchar(30) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -CREATE UNIQUE INDEX `unique` ON `zt_deliverablestage`(`deliverable`,`stage`); \ No newline at end of file +CREATE UNIQUE INDEX `unique` ON `zt_deliverablestage`(`deliverable`,`stage`); diff --git a/db/zentao.sql b/db/zentao.sql index 853177998b..ab010c086e 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -848,7 +848,7 @@ CREATE TABLE IF NOT EXISTS `zt_doc` ( `editedList` text NULL, `mailto` text NULL, `acl` varchar(10) NOT NULL DEFAULT 'open', - `isDeliverable` char(10) NOT NULL DEFAULT 'no', + `isDeliverable` char(10) NOT NULL DEFAULT '0', `groups` varchar(255) NOT NULL DEFAULT '', `users` text NULL, `readGroups` varchar(255) NOT NULL DEFAULT '', diff --git a/lib/zin/wg/deliverable/v1.php b/lib/zin/wg/deliverable/v1.php index 4783721636..88f5491479 100644 --- a/lib/zin/wg/deliverable/v1.php +++ b/lib/zin/wg/deliverable/v1.php @@ -71,12 +71,13 @@ class deliverable extends wg } $selectDocTips = $isTemplate ? $lang->deliverable->selectDoc : $lang->doc->selectDoc; + $docLink = $isTemplate ? helper::createLink('doc', 'ajaxGetTemplateDocs', 'keyword={search}') : helper::createLink('doc', 'ajaxGetMineDocs', 'keyword={search}'); return zui::deliverableList ( set::formName($formName), set::items($this->prop('items')), - set::docPicker(array('placeholder' => $selectDocTips, 'items' => helper::createLink('doc', 'ajaxGetMineDocs', 'keyword={search}'))), + set::docPicker(array('placeholder' => $selectDocTips, 'items' => $docLink)), set::getFileActions(jsRaw('window.getDeliverableFileActions')), set::getDocActions(jsRaw('window.getDocActions')), set::getEmptyActions(jsRaw('window.getDeliverableActions')), diff --git a/module/doc/config/form.php b/module/doc/config/form.php index 41ae672d29..57a7e521a5 100644 --- a/module/doc/config/form.php +++ b/module/doc/config/form.php @@ -62,7 +62,7 @@ $config->doc->form->create['rawContent'] = array('type' => 'string', 'requi $config->doc->form->create['template'] = array('type' => 'string', 'required' => false, 'default' => ''); $config->doc->form->create['templateType'] = array('type' => 'string', 'required' => false, 'default' => ''); $config->doc->form->create['chapterType'] = array('type' => 'string', 'required' => false, 'default' => ''); -$config->doc->form->create['isDeliverable'] = array('type' => 'string', 'required' => false, 'default' => 'no'); +$config->doc->form->create['isDeliverable'] = array('type' => 'string', 'required' => false, 'default' => '0'); $config->doc->form->createtemplate = $config->doc->form->create; $config->doc->form->createtemplate['templateDesc'] = array('type' => 'string', 'required' => false, 'default' => ''); @@ -88,7 +88,7 @@ $config->doc->form->edit['readUsers'] = array('type' => 'array', 'require $config->doc->form->edit['mailto'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join'); $config->doc->form->edit['editedBy'] = array('type' => 'string', 'required' => false, 'default' => ''); $config->doc->form->edit['editedDate'] = array('type' => 'datetime', 'required' => false, 'default' => $now); -$config->doc->form->edit['isDeliverable'] = array('type' => 'string', 'required' => false, 'default' => 'no'); +$config->doc->form->edit['isDeliverable'] = array('type' => 'string', 'required' => false, 'default' => '0'); $config->doc->form->edittemplate = $config->doc->form->edit; $config->doc->form->edittemplate['templateDesc'] = array('type' => 'string', 'required' => false, 'default' => ''); diff --git a/module/doc/js/setdocbasic.ui.js b/module/doc/js/setdocbasic.ui.js index 4800f3db9f..9f0bf80f60 100644 --- a/module/doc/js/setdocbasic.ui.js +++ b/module/doc/js/setdocbasic.ui.js @@ -31,7 +31,7 @@ window.loadExecutions = function() window.changeIsDeliverable = function() { - if($(this).val() == 'yes') + if($(this).val() == '1') { $('[type=radio][name=acl]').attr('disabled', 'disabled'); $('#acl').removeAttr('disabled'); diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index d6ec97e587..d666e917a3 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -142,8 +142,8 @@ $lang->docTemplate->filterTypes[] = array('draft', 'Draft'); $lang->docTemplate->filterTypes[] = array('released', 'Released'); $lang->docTemplate->filterTypes[] = array('createdByMe', 'Created By Me'); -$lang->docTemplate->deliverableList['yes'] = 'Yes'; -$lang->docTemplate->deliverableList['no'] = 'No'; +$lang->docTemplate->deliverableList['1'] = 'Yes'; +$lang->docTemplate->deliverableList['0'] = 'No'; /* Fields. */ $lang->doc->common = 'Dok'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 398dd98cb3..71aca17f31 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -142,8 +142,8 @@ $lang->docTemplate->filterTypes[] = array('draft', 'Draft'); $lang->docTemplate->filterTypes[] = array('released', 'Released'); $lang->docTemplate->filterTypes[] = array('createdByMe', 'Created By Me'); -$lang->docTemplate->deliverableList['yes'] = 'Yes'; -$lang->docTemplate->deliverableList['no'] = 'No'; +$lang->docTemplate->deliverableList['1'] = 'Yes'; +$lang->docTemplate->deliverableList['0'] = 'No'; /* Fields. */ $lang->doc->common = 'Document'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 8734efa414..2ead71a62d 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -142,8 +142,8 @@ $lang->docTemplate->filterTypes[] = array('draft', 'Draft'); $lang->docTemplate->filterTypes[] = array('released', 'Released'); $lang->docTemplate->filterTypes[] = array('createdByMe', 'Created By Me'); -$lang->docTemplate->deliverableList['yes'] = 'Yes'; -$lang->docTemplate->deliverableList['no'] = 'No'; +$lang->docTemplate->deliverableList['1'] = 'Yes'; +$lang->docTemplate->deliverableList['0'] = 'No'; /* Fields. */ $lang->doc->common = 'Gestion Documentaire'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 6b9095a864..9212b1d309 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -142,8 +142,8 @@ $lang->docTemplate->filterTypes[] = array('draft', '草稿'); $lang->docTemplate->filterTypes[] = array('released', '已发布'); $lang->docTemplate->filterTypes[] = array('createdByMe', '我创建的'); -$lang->docTemplate->deliverableList['yes'] = '是'; -$lang->docTemplate->deliverableList['no'] = '否'; +$lang->docTemplate->deliverableList['1'] = '是'; +$lang->docTemplate->deliverableList['0'] = '否'; /* 字段列表。*/ $lang->doc->common = '文档'; diff --git a/module/doc/ui/setdocbasic.template.html.php b/module/doc/ui/setdocbasic.template.html.php index 61b77fb9d9..b5ab3958ef 100644 --- a/module/doc/ui/setdocbasic.template.html.php +++ b/module/doc/ui/setdocbasic.template.html.php @@ -71,7 +71,7 @@ formPanel set::inline(true), set::name('isDeliverable'), set::items($lang->docTemplate->deliverableList), - set::value($docID ? $doc->isDeliverable : 'no') + set::value($docID ? $doc->isDeliverable : '0') ) ) : null, empty($parentID) ? formGroup @@ -81,10 +81,10 @@ formPanel ( setClass($objectType == 'mine' ? 'pointer-events-none' : ''), set::name('acl'), - set::disabled($docID && $doc->isDeliverable == 'yes' ? true : false), + set::disabled($docID && $doc->isDeliverable ? true : false), set::items($lang->doc->aclListA), set::value(isset($doc) ? $doc->acl : 'open') ), - input(setClass('hidden'), set::name('acl'), set::id('acl'), set::disabled($docID && $doc->isDeliverable == 'yes' ? false : true), set::value('open')) + input(setClass('hidden'), set::name('acl'), set::id('acl'), set::disabled($docID && $doc->isDeliverable ? false : true), set::value('open')) ) : null );