diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php
index 72afbccdf..ad568bb23 100644
--- a/views/bootstrap/class.EditDocument.php
+++ b/views/bootstrap/class.EditDocument.php
@@ -202,12 +202,13 @@ $(document).ready( function() {
if ($folder->getAccessMode($user) > M_READ) {
$this->formField(getMLText("sequence"), $this->getSequenceChooser($folder->getDocuments('s'), $document->getID()).($orderby != 's' ? "
".getMLText('order_by_sequence_off') : ''));
}
+ }
if($attrdefgrps) {
$attrdefids = array();
foreach($attrdefgrps as $attrdefgrp) {
$attrdefs = $attrdefgrp['group']->getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::objtype_document));
- echo "
".htmlspecialchars($attrdefgrp['group']->getName())." |
";
+ $this->contentSubHeading(htmlspecialchars($attrdefgrp['group']->getName()));
foreach($attrdefs as $attrdefarr) {
$attrdef = $attrdefarr['attrdef'];
$show = $attrdefarr['show'];
@@ -219,27 +220,15 @@ $(document).ready( function() {
if(!in_array($attrdef->getID(), $attrdefids)) {
$arr = $this->callHook('editDocumentAttribute', $document, $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, $document->getAttribute($attrdef)) ?> |
-
-formField(htmlspecialchars($attrdef->getName()).($shows ? " (".implode(", ", $shows).")" : ''), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
}
$attrdefids[] = $attrdef->getID();
- } else {
-?>
-
- getName()); ?> |
- getAttribute($attrdef)->getValue(); ?> |
-
-formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
}
- } else {
- if($attribute = $document->getAttribute($attrdef)) {
-?>
-
- getName()); ?> |
- getValue() ?> |
-
-