diff --git a/views/bootstrap/class.EditFolder.php b/views/bootstrap/class.EditFolder.php index 811087674..e77c4be80 100644 --- a/views/bootstrap/class.EditFolder.php +++ b/views/bootstrap/class.EditFolder.php @@ -116,7 +116,7 @@ $(document).ready(function() { $attrdefids = array(); foreach($attrdefgrps as $attrdefgrp) { $attrdefs = $attrdefgrp['group']->getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::objtype_folder)); - echo "".htmlspecialchars($attrdefgrp['group']->getName()).""; + $this->contentSubHeading(htmlspecialchars($attrdefgrp['group']->getName())); foreach($attrdefs as $attrdefarr) { $attrdef = $attrdefarr['attrdef']; $show = $attrdefarr['show']; @@ -128,28 +128,18 @@ $(document).ready(function() { if(!in_array($attrdef->getID(), $attrdefids)) { $arr = $this->callHook('folderEditAttribute', $folder, $attrdef); if(is_array($arr)) { - echo $txt; - echo ""; - echo "".$arr[0].""; - echo "".$arr[1].""; - echo ""; + if($arr) { + $this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null); + } + } elseif(is_string($arr)) { + echo $arr; } else { -?> - - getName()); ?>: - printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?> - -formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $folder->getAttribute($attrdef))); } $attrdefids[] = $attrdef->getID(); } else { if($folder->getAttribute($attrdef)) { -?> - - getName()); ?> - getAttribute($attrdef)->getValue(); ?> - -formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $folder->getAttribute($attrdef))); } } } @@ -174,12 +164,7 @@ $(document).ready(function() { } } else { if($attribute = $folder->getAttribute($attrdef)) { -?> - - getName()); ?> - getValue() ?> - -formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $attribute)); } } }