mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
new and modified hooks
add hook addDocumentContentAttributes, addDocumentContentAttributes and editDocumentContentAttribute can also return a string
This commit is contained in:
parent
b8447b7d39
commit
dfa2d03cf9
|
@ -53,18 +53,28 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
|
|||
<input type="hidden" name="version" value="<?php print $version->getVersion();?>">
|
||||
|
||||
<?php
|
||||
if($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$arr = $this->callHook('editDocumentContentAttribute', $version, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
if($arr) {
|
||||
$this->formField($arr[0], $arr[1]);
|
||||
}
|
||||
} else {
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $version->getAttribute($attrdef)));
|
||||
if($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$arr = $this->callHook('editDocumentContentAttribute', $version, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
if($arr) {
|
||||
$this->formField($arr[0], $arr[1]);
|
||||
}
|
||||
} elseif(is_string($arr) {
|
||||
echo $arr;
|
||||
} else {
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $version->getAttribute($attrdef)));
|
||||
}
|
||||
}
|
||||
}
|
||||
$arrs = $this->callHook('addDocumentContentAttributes', $version);
|
||||
if(is_array($arrs)) {
|
||||
foreach($arrs as $arr) {
|
||||
$this->formField($arr[0], $arr[1]);
|
||||
}
|
||||
} elseif(is_string($arr) {
|
||||
echo $arr;
|
||||
}
|
||||
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue
Block a user