mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +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();
|
$tmpcatids[] = $tmpcat->getID();
|
||||||
$options = array();
|
$options = array();
|
||||||
$allcategories = $dms->getDocumentCategories();
|
$allcategories = $dms->getDocumentCategories();
|
||||||
foreach($allcategories as $acategory) {
|
if($allcategories) {
|
||||||
$options[] = array($acategory->getID(), $acategory->getName(), in_array($acategory->getId(), $tmpcatids));
|
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();
|
$options = array();
|
||||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||||
if($workflowmode == 'traditional') {
|
if($workflowmode == 'traditional') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user