mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 21:16:07 +00:00
do not allow to select category if no categories exists
This commit is contained in:
parent
14d8a1bd91
commit
004af591a9
|
@ -223,9 +223,10 @@ console.log(params);
|
||||||
getMLText("keywords"),
|
getMLText("keywords"),
|
||||||
$this->getKeywordChooserHtml('adddocform')
|
$this->getKeywordChooserHtml('adddocform')
|
||||||
);
|
);
|
||||||
|
$categories = $dms->getDocumentCategories();
|
||||||
|
if($categories) {
|
||||||
if(!$nodocumentformfields || !in_array('categories', $nodocumentformfields)) {
|
if(!$nodocumentformfields || !in_array('categories', $nodocumentformfields)) {
|
||||||
$options = array();
|
$options = array();
|
||||||
$categories = $dms->getDocumentCategories();
|
|
||||||
foreach($categories as $category) {
|
foreach($categories as $category) {
|
||||||
$options[] = array($category->getID(), $category->getName());
|
$options[] = array($category->getID(), $category->getName());
|
||||||
}
|
}
|
||||||
|
@ -241,6 +242,7 @@ console.log(params);
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(!$nodocumentformfields || !in_array('sequence', $nodocumentformfields)) {
|
if(!$nodocumentformfields || !in_array('sequence', $nodocumentformfields)) {
|
||||||
$this->formField(getMLText("sequence"), $this->getSequenceChooser($folder->getDocuments('s')).($orderby != 's' ? "<br />".getMLText('order_by_sequence_off') : ''));
|
$this->formField(getMLText("sequence"), $this->getSequenceChooser($folder->getDocuments('s')).($orderby != 's' ? "<br />".getMLText('order_by_sequence_off') : ''));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -134,9 +134,10 @@ $(document).ready( function() {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$categories = $dms->getDocumentCategories();
|
||||||
|
if($categories) {
|
||||||
if(!$nodocumentformfields || !in_array('categories', $nodocumentformfields)) {
|
if(!$nodocumentformfields || !in_array('categories', $nodocumentformfields)) {
|
||||||
$options = array();
|
$options = array();
|
||||||
$categories = $dms->getDocumentCategories();
|
|
||||||
foreach($categories as $category) {
|
foreach($categories as $category) {
|
||||||
$options[] = array($category->getID(), $category->getName(), in_array($category, $document->getCategories()));
|
$options[] = array($category->getID(), $category->getName(), in_array($category, $document->getCategories()));
|
||||||
}
|
}
|
||||||
|
@ -165,6 +166,7 @@ $(document).ready( function() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(!$nodocumentformfields || !in_array('expires', $nodocumentformfields)) {
|
if(!$nodocumentformfields || !in_array('expires', $nodocumentformfields)) {
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[] = array('never', getMLText('does_not_expire'));
|
$options[] = array('never', getMLText('does_not_expire'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user