extension config can filter attributes by type

This commit is contained in:
Uwe Steinmann 2022-05-20 12:04:24 +02:00
parent f718f565ff
commit 8f6402c51f

View File

@ -613,10 +613,9 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
} }
break; break;
case "attributedefinitions": case "attributedefinitions":
if(empty($conf['objtype'])) $objtype = empty($conf['objtype']) ? 0 : $conf['objtype'];
$recs = $dms->getAllAttributeDefinitions(); $attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype'];
else $recs = $dms->getAllAttributeDefinitions(explode(',', $objtype), explode(',', $attrtype));
$recs = $dms->getAllAttributeDefinitions(explode(',', $conf['objtype']));
if($recs) { if($recs) {
echo "<select class=\"chzn-select\"".($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")."\">"; echo "<select class=\"chzn-select\"".($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")."\">";
if($allowempty) if($allowempty)