mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
issue a message if no attributes are defined
This commit is contained in:
parent
03eb842f8e
commit
b9f4d7b0ba
|
@ -52,8 +52,8 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Theme_Style {
|
|||
<input type="hidden" name="version" value="<?php print $version->getVersion();?>">
|
||||
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
if($attrdefs) {
|
||||
$this->contentContainerStart();
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$arr = $this->callHook('editDocumentContentAttribute', $version, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
|
@ -66,17 +66,19 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Theme_Style {
|
|||
$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], isset($arr[2]) ? $arr[2] : null);
|
||||
$arrs = $this->callHook('addDocumentContentAttributes', $version);
|
||||
if(is_array($arrs)) {
|
||||
foreach($arrs as $arr) {
|
||||
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
|
||||
}
|
||||
} elseif(is_string($arrs)) {
|
||||
echo $arrs;
|
||||
}
|
||||
} elseif(is_string($arrs)) {
|
||||
echo $arrs;
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
} else {
|
||||
$this->warningMsg(getMLText('no_attributes_defined'));
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue
Block a user