diff --git a/CHANGELOG b/CHANGELOG index 91805b81b..a0fda89eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,9 @@ - new hooks leftContentPre and leftContentPost - minimize sql queries when fetching sub folders and documents of a folder - custom attributes can be validated in a hook +- document attributes comment, keywords, categories, expiration date, and sequence + can be turned of in the configuration +- workflows can be turned off completely -------------------------------------------------------------------------------- Changes in version 5.1.13 diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php index 796c8852f..083103d65 100644 --- a/out/out.UpdateDocument.php +++ b/out/out.UpdateDocument.php @@ -69,6 +69,7 @@ if($view) { $view->setParam('folder', $folder); $view->setParam('document', $document); $view->setParam('strictformcheck', $settings->_strictFormCheck); + $view->setParam('nodocumentformfields', $settings->_noDocumentFormFields); $view->setParam('enablelargefileupload', $settings->_enableLargeFileUpload); $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 62f7b1b21..36ccdf1e6 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -345,6 +345,7 @@ $(document).ready(function() { $this->getDropFolderChooserHtml("form1", $dropfolderfile) ); } + if(!$nodocumentformfields || !in_array('version_comment', $nodocumentformfields)) { $this->formField( getMLText("comment_for_current_version"), array( @@ -363,6 +364,7 @@ $(document).ready(function() { 'value'=>1 ) ); + } $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { @@ -429,7 +431,7 @@ $(document).ready(function() { ); } $this->warningMsg(getMLText("add_doc_workflow_warning")); - } else { + } elseif($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { if($workflowmode == 'traditional') { $this->contentSubHeading(getMLText("assign_reviewers")); diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index f7d5ade23..f4d49f049 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -277,7 +277,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { - + diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 9ca469a16..6d43adc72 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -421,7 +421,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); -- SETTINGS - ADVANCED - EDITION --> showConfigHeadline('settings_Edition'); ?> -showConfigOption('settings_workflowMode', 'workflowMode', array('traditional'=>'settings_workflowMode_valtraditional', 'traditional_only_approval'=>'settings_workflowMode_valtraditional_only_approval', 'advanced'=>'settings_workflowMode_valadvanced'), false, true); ?> +showConfigOption('settings_workflowMode', 'workflowMode', array('traditional'=>'settings_workflowMode_valtraditional', 'traditional_only_approval'=>'settings_workflowMode_valtraditional_only_approval', 'advanced'=>'settings_workflowMode_valadvanced', 'none'=>'settings_workflowMode_valnone'), false, true); ?> showConfigText('settings_versioningFileName', 'versioningFileName'); ?> showConfigText('settings_presetExpirationDate', 'presetExpirationDate'); ?> showConfigCheckbox('settings_allowReviewerOnly', 'allowReviewerOnly'); ?> diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index a75e27de6..12ce32cb6 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -142,6 +142,7 @@ console.log(element); $folder = $this->params['folder']; $document = $this->params['document']; $strictformcheck = $this->params['strictformcheck']; + $nodocumentformfields = $this->params['nodocumentformfields']; $enablelargefileupload = $this->params['enablelargefileupload']; $maxuploadsize = $this->params['maxuploadsize']; $enableadminrevapp = $this->params['enableadminrevapp']; @@ -230,6 +231,7 @@ console.log(element); $this->getDropFolderChooserHtml("form1") ); } + if(!$nodocumentformfields || !in_array('version_comment', $nodocumentformfields)) { $this->formField( getMLText("comment"), array( @@ -239,6 +241,8 @@ console.log(element); 'cols'=>80 ) ); + } + if(!$nodocumentformfields || !in_array('expires', $nodocumentformfields)) { if($presetexpiration) { if(!($expts = strtotime($presetexpiration))) $expts = false; @@ -265,6 +269,7 @@ console.log(element); getMLText("expires"), $this->getDateChooser(($expts ? date('Y-m-d', $expts) : ''), "expdate", $this->params['session']->getLanguage()) ); + } $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 64a3a5d62..60bb7c63c 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -483,7 +483,7 @@ $(document).ready( function() { 'options'=>$options ) ); - } else { + } elseif($workflowmode == 'advanced') { $workflows = $dms->getAllWorkflows(); if($workflows) { $this->contentSubHeading(getMLText("workflow")); diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index c77a156ea..e5fa08219 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -486,7 +486,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $needwkflaction = false; if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { - } else { + } elseif($workflowmode == 'advanced') { $workflow = $latestContent->getWorkflow(); if($workflow) { $workflowstate = $latestContent->getWorkflowState(); @@ -528,7 +528,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {