mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +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();?>">
|
<input type="hidden" name="version" value="<?php print $version->getVersion();?>">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerStart();
|
|
||||||
if($attrdefs) {
|
if($attrdefs) {
|
||||||
|
$this->contentContainerStart();
|
||||||
foreach($attrdefs as $attrdef) {
|
foreach($attrdefs as $attrdef) {
|
||||||
$arr = $this->callHook('editDocumentContentAttribute', $version, $attrdef);
|
$arr = $this->callHook('editDocumentContentAttribute', $version, $attrdef);
|
||||||
if(is_array($arr)) {
|
if(is_array($arr)) {
|
||||||
|
@ -66,7 +66,6 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Theme_Style {
|
||||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $version->getAttribute($attrdef)));
|
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $version->getAttribute($attrdef)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$arrs = $this->callHook('addDocumentContentAttributes', $version);
|
$arrs = $this->callHook('addDocumentContentAttributes', $version);
|
||||||
if(is_array($arrs)) {
|
if(is_array($arrs)) {
|
||||||
foreach($arrs as $arr) {
|
foreach($arrs as $arr) {
|
||||||
|
@ -77,6 +76,9 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Theme_Style {
|
||||||
}
|
}
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||||
|
} else {
|
||||||
|
$this->warningMsg(getMLText('no_attributes_defined'));
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue
Block a user