Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2023-10-15 17:31:43 +02:00
commit 000f1e2c44
5 changed files with 30 additions and 24 deletions

View File

@ -185,7 +185,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
@ -797,6 +797,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->_enableSelfReceipt = Settings::boolval($tab["enableSelfReceipt"]);
@ -1166,6 +1167,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, "enableSelfReceipt", $this->_enableSelfReceipt);

View File

@ -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;

View File

@ -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) {
?>
<form class="form-horizontal" action="../op/op.SetWorkflow.php" method="post" name="form1">
<?php echo createHiddenFieldWithKey('setworkflow'); ?>
@ -80,34 +80,34 @@ $(document).ready( function() {
<input type="hidden" name="showtree" value="<?php echo showtree();?>">
<?php
$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'));
$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'));
?>
</form>
<?php
} else {
} else {
?>
<p><?php printMLText('no_workflow_available'); ?></p>
<?php
}
}
$this->columnEnd();
$this->columnStart(8);
?>

View File

@ -535,6 +535,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
<?php $this->showConfigCheckbox('settings_enableAdminRevApp', 'enableAdminRevApp'); ?>
<?php $this->showConfigCheckbox('settings_enableOwnerRevApp', 'enableOwnerRevApp'); ?>
<?php $this->showConfigCheckbox('settings_enableSelfRevApp', 'enableSelfRevApp'); ?>
<?php $this->showConfigCheckbox('settings_enableHiddenRevApp', 'enableHiddenRevApp'); ?>
<?php $this->showConfigCheckbox('settings_enableUpdateRevApp', 'enableUpdateRevApp'); ?>
<?php $this->showConfigCheckbox('settings_enableRemoveRevApp', 'enableRemoveRevApp'); ?>
<?php $this->showConfigCheckbox('settings_enableSelfReceipt', 'enableSelfReceipt'); ?>

View File

@ -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 "<select class=\"chzn-select\" name=\"users[]\" multiple=\"multiple\" data-placeholder=\"".getMLText('select_users')."\" data-no_results_text=\"".getMLText('unknown_user')."\">";
$allusers = $dms->getAllUsers();
foreach($allusers as $usr) {
if(!$enablehiddenrevapp && $usr->isHidden()) continue;
print "<option value=\"".$usr->getID()."\">". htmlspecialchars($usr->getLogin()." - ".$usr->getFullName())."</option>";
}
echo "</select>";