mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
do not show filter for categories if none exist
This commit is contained in:
parent
0aedf55ec6
commit
929129abac
|
@ -610,20 +610,22 @@ $(document).ready(function() {
|
|||
$tmpcatids[] = $tmpcat->getID();
|
||||
$options = array();
|
||||
$allcategories = $dms->getDocumentCategories();
|
||||
foreach($allcategories as $acategory) {
|
||||
$options[] = array($acategory->getID(), $acategory->getName(), in_array($acategory->getId(), $tmpcatids));
|
||||
if($allcategories) {
|
||||
foreach($allcategories as $acategory) {
|
||||
$options[] = array($acategory->getID(), $acategory->getName(), in_array($acategory->getId(), $tmpcatids));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("categories"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'category[]',
|
||||
'multiple'=>true,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_category'), array('data-no_results_text', getMLText('unknown_document_category')))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("categories"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'category[]',
|
||||
'multiple'=>true,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_category'), array('data-no_results_text', getMLText('unknown_document_category')))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
if($workflowmode == 'traditional') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user