mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-20 08:18:17 +00:00
replace plain html by formField()
This commit is contained in:
parent
5e357e9f0b
commit
98993e89df
|
|
@ -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 "<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'];
|
||||
|
|
@ -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 "<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, $folder->getAttribute($attrdef)) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $folder->getAttribute($attrdef)));
|
||||
}
|
||||
$attrdefids[] = $attrdef->getID();
|
||||
} else {
|
||||
if($folder->getAttribute($attrdef)) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
|
||||
<td><?php echo $folder->getAttribute($attrdef)->getValue(); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $folder->getAttribute($attrdef)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -174,12 +164,7 @@ $(document).ready(function() {
|
|||
}
|
||||
} else {
|
||||
if($attribute = $folder->getAttribute($attrdef)) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
|
||||
<td><?php echo $attribute->getValue() ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $attribute));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user