add new extension config folderlist for select-internal

This commit is contained in:
Uwe Steinmann 2024-10-31 18:06:40 +01:00
parent bcaaa82014
commit 5fb5cd00bc

View File

@ -768,6 +768,19 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
case "folders":
$this->formField(null, $this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getFolder($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]"));
break;
case "folderlist":
echo "<select class=\"chzn-select-folder\"".($allowempty ? " data-allow-clear=\"true\"" : "")." name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attribute_value")."\" style=\"width: 100%;\">";
if($selections) {
foreach ($selections as $selid) {
if ($f = $dms->getFolder($selid)) {
echo "<option value=\"".$f->getID()."\"";
echo " selected";
echo ">".htmlspecialchars($f->getName())."</option>";
}
}
}
echo "</select>";
break;
case "documents":
$this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]"));
break;