manually change document status from 'draft' to 'released' if allowed in configuration

This commit is contained in:
Uwe Steinmann 2026-01-30 12:45:16 +01:00
parent 48800032d9
commit 52868d8555
5 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,8 @@
- fix error when creating a new document list with a name used by another user
- reception of document can be deleted to enforce a new reception
- fully support 'Enable hidden users in reception list'
- manually change document status from 'draft' to 'released' if allowed
in configuration
--------------------------------------------------------------------------------
Changes in version 6.0.37

View File

@ -262,6 +262,8 @@ class Settings { /* {{{ */
var $_presetExpirationDate = "";
// initial document status
var $_initialDocumentStatus = 2; //S_RELEASED;
// allow manually setting status from draft to release
var $_allowDraftToRelease = false;
// the name of the versioning info file created by the backup tool
var $_versioningFileName = "versioning_info.txt";
// the mode of workflow
@ -897,6 +899,7 @@ class Settings { /* {{{ */
$this->_globalGroupApprover = explode(',',strval($tab["globalGroupApprover"]));
$this->_presetExpirationDate = strval($tab["presetExpirationDate"]);
$this->_initialDocumentStatus = intval($tab["initialDocumentStatus"]);
$this->_allowDraftToRelease = Settings::boolval($tab["allowDraftToRelease"]);
$this->_versioningFileName = strval($tab["versioningFileName"]);
$this->_workflowMode = strval($tab["workflowMode"]);
$this->_enableReceiptWorkflow = Settings::boolval($tab["enableReceiptWorkflow"]);
@ -1288,6 +1291,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "enableFilterReceipt", $this->_enableFilterReceipt);
$this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate);
$this->setXMLAttributValue($node, "initialDocumentStatus", $this->_initialDocumentStatus);
$this->setXMLAttributValue($node, "allowDraftToRelease", $this->_allowDraftToRelease);
$this->setXMLAttributValue($node, "addManagerAsReviewer", $this->_addManagerAsReviewer);
$this->setXMLAttributValue($node, "addManagerAsApprover", $this->_addManagerAsApprover);
$this->setXMLAttributValue($node, "globalReviewer", implode(',', $this->_globalReviewer));

View File

@ -257,6 +257,7 @@ if ($action == "saveSettings")
setStrValue("versioningFileName");
setStrValue("presetExpirationDate");
setStrValue("initialDocumentStatus");
setBoolValue("allowDraftToRelease");
setStrValue("workflowMode");
setBoolValue("enableReceiptWorkflow");
setBoolValue("enableReceiptReject");

View File

@ -49,6 +49,7 @@ $(document).ready(function() {
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$content = $this->params['version'];
@ -92,6 +93,8 @@ $(document).ready(function() {
$options[] = array(S_OBSOLETE, getOverallStatusText(S_OBSOLETE));
if ($overallStatus["status"] != S_DRAFT)
$options[] = array(S_DRAFT, getOverallStatusText(S_DRAFT));
if ($settings->_allowDraftToRelease && $overallStatus["status"] == S_DRAFT)
$options[] = array(S_RELEASED, getOverallStatusText(S_RELEASED));
if ($overallStatus["status"] != S_NEEDS_CORRECTION)
$options[] = array(S_NEEDS_CORRECTION, getOverallStatusText(S_NEEDS_CORRECTION));
$this->formField(

View File

@ -853,6 +853,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
<?php $this->showConfigText('settings_versioningFileName', 'versioningFileName'); ?>
<?php $this->showConfigText('settings_presetExpirationDate', 'presetExpirationDate'); ?>
<?php $this->showConfigOption('settings_initialDocumentStatus', 'initialDocumentStatus', array(' '.S_RELEASED=>'settings_initialDocumentStatus_released', ' '.S_DRAFT=>'settings_initialDocumentStatus_draft'), false, true); ?>
<?php $this->showConfigCheckbox('settings_allowDraftToRelease', 'allowDraftToRelease'); ?>
<?php $this->showConfigCheckbox('settings_allowReviewerOnly', 'allowReviewerOnly'); ?>
<?php $this->showConfigCheckbox('settings_allowChangeRevAppInProcess', 'allowChangeRevAppInProcess'); ?>
<?php $this->showConfigCheckbox('settings_enableAdminRevApp', 'enableAdminRevApp'); ?>