replace old html code

This commit is contained in:
Uwe Steinmann 2021-06-28 13:00:03 +02:00
parent 3c081b3439
commit 3b6b7f6662

View File

@ -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' ? "<br />".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 "<tr><td colspan=\"2\"><b>".htmlspecialchars($attrdefgrp['group']->getName())."</b></td></tr>";
$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 "<tr>";
echo "<td>".$arr[0]."</td>";
echo "<td>".$arr[1]."</td>";
echo "</tr>";
if($arr) {
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
}
} elseif(is_string($arr)) {
echo $arr;
} else {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?><?php echo $shows ? " (".implode(", ", $shows).")" : ''; ?>:</td>
<td><?php $this->printAttributeEditField($attrdef, $document->getAttribute($attrdef)) ?></td>
</tr>
<?php
$this->formField(htmlspecialchars($attrdef->getName()).($shows ? " (".implode(", ", $shows).")" : ''), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
}
$attrdefids[] = $attrdef->getID();
} else {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php echo $document->getAttribute($attrdef)->getValue(); ?></td>
</tr>
<?php
}
}
}
@ -261,15 +250,6 @@ $(document).ready( function() {
} else {
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
}
} else {
if($attribute = $document->getAttribute($attrdef)) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php echo $attribute->getValue() ?></td>
</tr>
<?php
}
}
}
}