pass 3rd parameter to formField() if returned by hook

This commit is contained in:
Uwe Steinmann 2021-03-19 10:52:39 +01:00
parent a9a68d9d7b
commit bbc4943973

View File

@ -208,7 +208,7 @@ $(document).ready(function() {
$arr = $this->callHook('editDocumentContentAttribute', $document, $attrdef);
if(is_array($arr)) {
if($arr)
$this->formField($arr[0], $arr[1]);
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
} elseif(is_string($arr)) {
echo $arr;
} else {
@ -219,7 +219,7 @@ $(document).ready(function() {
$arrs = $this->callHook('addDocumentContentAttributes', $folder);
if(is_array($arrs)) {
foreach($arrs as $arr) {
$this->formField($arr[0], $arr[1]);
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
}
} elseif(is_string($arrs)) {
echo $arrs;