From f56b500b9feee838868104c7ff050a8323357b7a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 15 Oct 2023 17:28:31 +0200 Subject: [PATCH 1/4] save and read enableHiddenRevApp from settings --- inc/inc.ClassSettings.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index e97b8a8a7..2aa5f1932 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -177,7 +177,7 @@ class Settings { /* {{{ */ // enable/disable listing logged in user as reviewer/approver var $_enableSelfRevApp = false; // enable/disable hidden user as reviewer/approver - var $_enableHiddenRevApp = false; + var $_enableHiddenRevApp = true; // enable/disable update of a review/approval by the reviewer/approver var $_enableUpdateRevApp = false; // enable/disable removal of a review/approval by the admiistrator @@ -744,6 +744,7 @@ class Settings { /* {{{ */ $this->_enableAdminRevApp = Settings::boolval($tab["enableAdminRevApp"]); $this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]); $this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]); + $this->_enableHiddenRevApp = Settings::boolval($tab["enableHiddenRevApp"]); $this->_enableUpdateRevApp = Settings::boolval($tab["enableUpdateRevApp"]); $this->_enableRemoveRevApp = Settings::boolval($tab["enableRemoveRevApp"]); $this->_presetExpirationDate = strval($tab["presetExpirationDate"]); @@ -1093,6 +1094,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableAdminRevApp", $this->_enableAdminRevApp); $this->setXMLAttributValue($node, "enableOwnerRevApp", $this->_enableOwnerRevApp); $this->setXMLAttributValue($node, "enableSelfRevApp", $this->_enableSelfRevApp); + $this->setXMLAttributValue($node, "enableHiddenRevApp", $this->_enableHiddenRevApp); $this->setXMLAttributValue($node, "enableUpdateRevApp", $this->_enableUpdateRevApp); $this->setXMLAttributValue($node, "enableRemoveRevApp", $this->_enableRemoveRevApp); $this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate); From 889f49dacab8892cc6c6da4e40596af624912891 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 15 Oct 2023 17:29:28 +0200 Subject: [PATCH 2/4] fix line indenting --- views/bootstrap/class.SetWorkflow.php | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/views/bootstrap/class.SetWorkflow.php b/views/bootstrap/class.SetWorkflow.php index 3d60834d5..6ce33a06d 100644 --- a/views/bootstrap/class.SetWorkflow.php +++ b/views/bootstrap/class.SetWorkflow.php @@ -70,8 +70,8 @@ $(document).ready( function() { // Display the Workflow form. $this->rowStart(); $this->columnStart(4); - $workflows = $dms->getAllWorkflows(); - if($workflows) { + $workflows = $dms->getAllWorkflows(); + if($workflows) { ?>
@@ -80,34 +80,34 @@ $(document).ready( function() { contentContainerStart(); - $mandatoryworkflow = $user->getMandatoryWorkflow(); - $workflows=$dms->getAllWorkflows(); - $options = array(); - foreach ($workflows as $workflow) { - $options[] = array($workflow->getID(), htmlspecialchars($workflow->getName()), $mandatoryworkflow && $mandatoryworkflow->getID() == $workflow->getID()); - } - $this->formField( - getMLText("workflow"), - array( - 'element'=>'select', - 'id'=>'selector', - 'name'=>'workflow', - 'data-placeholder'=>getMLText('select_workflow'), - 'options'=>$options - ) - ); - $this->contentContainerEnd(); - $this->formSubmit(getMLText('set_workflow')); + $this->contentContainerStart(); + $mandatoryworkflow = $user->getMandatoryWorkflow(); + $workflows=$dms->getAllWorkflows(); + $options = array(); + foreach ($workflows as $workflow) { + $options[] = array($workflow->getID(), htmlspecialchars($workflow->getName()), $mandatoryworkflow && $mandatoryworkflow->getID() == $workflow->getID()); + } + $this->formField( + getMLText("workflow"), + array( + 'element'=>'select', + 'id'=>'selector', + 'name'=>'workflow', + 'data-placeholder'=>getMLText('select_workflow'), + 'options'=>$options + ) + ); + $this->contentContainerEnd(); + $this->formSubmit(getMLText('set_workflow')); ?>

columnEnd(); $this->columnStart(8); ?> From 45d00e5bd0f1991f76b0612d027199ee12d07d59 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 15 Oct 2023 17:30:03 +0200 Subject: [PATCH 3/4] check $settings->_enableHiddenRevApp --- out/out.WorkflowMgr.php | 1 + views/bootstrap/class.WorkflowMgr.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/out/out.WorkflowMgr.php b/out/out.WorkflowMgr.php index ce2f18708..dacf7ba21 100644 --- a/out/out.WorkflowMgr.php +++ b/out/out.WorkflowMgr.php @@ -57,6 +57,7 @@ if($view) { $view->setParam('selworkflow', $selworkflow); $view->setParam('allworkflows', $workflows); $view->setParam('allworkflowstates', $workflowstates); + $view->setParam('enablehiddenrevapp', $settings->_enableHiddenRevApp); $view->setParam('accessobject', $accessop); $view($_GET); exit; diff --git a/views/bootstrap/class.WorkflowMgr.php b/views/bootstrap/class.WorkflowMgr.php index d7f9be7b5..70420f630 100644 --- a/views/bootstrap/class.WorkflowMgr.php +++ b/views/bootstrap/class.WorkflowMgr.php @@ -121,6 +121,7 @@ $(document).ready(function() { $user = $this->params['user']; $workflows = $this->params['allworkflows']; $workflowstates = $this->params['allworkflowstates']; + $enablehiddenrevapp = $this->params['enablehiddenrevapp']; if($workflow) { $path = $workflow->checkForCycles(); @@ -295,6 +296,7 @@ $(document).ready(function() { echo ""; From b2505e1486c1fbe2d5af15b61b098d8d93e85a84 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 15 Oct 2023 17:30:26 +0200 Subject: [PATCH 4/4] show checkbox for enableHiddenRevApp --- views/bootstrap/class.Settings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 2ee23b884..e04a75cb4 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -509,6 +509,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) showConfigCheckbox('settings_enableAdminRevApp', 'enableAdminRevApp'); ?> showConfigCheckbox('settings_enableOwnerRevApp', 'enableOwnerRevApp'); ?> showConfigCheckbox('settings_enableSelfRevApp', 'enableSelfRevApp'); ?> +showConfigCheckbox('settings_enableHiddenRevApp', 'enableHiddenRevApp'); ?> showConfigCheckbox('settings_enableUpdateRevApp', 'enableUpdateRevApp'); ?> showConfigCheckbox('settings_enableRemoveRevApp', 'enableRemoveRevApp'); ?> showConfigCheckbox('settings_enableVersionDeletion', 'enableVersionDeletion'); ?>