mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-07-15 08:58:10 +00:00
replace old html code
This commit is contained in:
parent
3c081b3439
commit
3b6b7f6662
|
@ -202,12 +202,13 @@ $(document).ready( function() {
|
||||||
if ($folder->getAccessMode($user) > M_READ) {
|
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') : ''));
|
$this->formField(getMLText("sequence"), $this->getSequenceChooser($folder->getDocuments('s'), $document->getID()).($orderby != 's' ? "<br />".getMLText('order_by_sequence_off') : ''));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($attrdefgrps) {
|
if($attrdefgrps) {
|
||||||
$attrdefids = array();
|
$attrdefids = array();
|
||||||
foreach($attrdefgrps as $attrdefgrp) {
|
foreach($attrdefgrps as $attrdefgrp) {
|
||||||
$attrdefs = $attrdefgrp['group']->getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::objtype_document));
|
$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) {
|
foreach($attrdefs as $attrdefarr) {
|
||||||
$attrdef = $attrdefarr['attrdef'];
|
$attrdef = $attrdefarr['attrdef'];
|
||||||
$show = $attrdefarr['show'];
|
$show = $attrdefarr['show'];
|
||||||
|
@ -219,27 +220,15 @@ $(document).ready( function() {
|
||||||
if(!in_array($attrdef->getID(), $attrdefids)) {
|
if(!in_array($attrdef->getID(), $attrdefids)) {
|
||||||
$arr = $this->callHook('editDocumentAttribute', $document, $attrdef);
|
$arr = $this->callHook('editDocumentAttribute', $document, $attrdef);
|
||||||
if(is_array($arr)) {
|
if(is_array($arr)) {
|
||||||
echo $txt;
|
if($arr) {
|
||||||
echo "<tr>";
|
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
|
||||||
echo "<td>".$arr[0]."</td>";
|
}
|
||||||
echo "<td>".$arr[1]."</td>";
|
} elseif(is_string($arr)) {
|
||||||
echo "</tr>";
|
echo $arr;
|
||||||
} else {
|
} else {
|
||||||
?>
|
$this->formField(htmlspecialchars($attrdef->getName()).($shows ? " (".implode(", ", $shows).")" : ''), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
|
||||||
<tr>
|
|
||||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?><?php echo $shows ? " (".implode(", ", $shows).")" : ''; ?>:</td>
|
|
||||||
<td><?php $this->printAttributeEditField($attrdef, $document->getAttribute($attrdef)) ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
$attrdefids[] = $attrdef->getID();
|
$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 {
|
} else {
|
||||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
|
$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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user