mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
use same edit attributes code as for add document
This commit is contained in:
parent
ab464b633d
commit
e2f2021b19
|
@ -283,22 +283,10 @@ console.log(element);
|
|||
if(is_array($arr)) {
|
||||
if($arr)
|
||||
$this->formField($arr[0], $arr[1]);
|
||||
} elseif(is_string($arr)) {
|
||||
echo $arr;
|
||||
} else {
|
||||
$presetbtnhtml = '';
|
||||
if($latestContent->getAttributeValue($attrdef)) {
|
||||
switch($attrdef->getType()) {
|
||||
case SeedDMS_Core_AttributeDefinition::type_string:
|
||||
case SeedDMS_Core_AttributeDefinition::type_date:
|
||||
case SeedDMS_Core_AttributeDefinition::type_int:
|
||||
case SeedDMS_Core_AttributeDefinition::type_float:
|
||||
$presetbtnhtml = $this->getInputPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator());
|
||||
break;
|
||||
case SeedDMS_Core_AttributeDefinition::type_boolean:
|
||||
$presetbtnhtml = $this->gettCheckboxPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef));
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, '', 'attributes_version')." ".$presetbtnhtml);
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user