check for min number of attribute values

This commit is contained in:
Uwe Steinmann 2016-10-27 10:55:33 +02:00
parent ad00b1cbe6
commit b8fa88b674

View File

@ -63,6 +63,8 @@ class SeedDMS_Controller_EditFolder extends SeedDMS_Controller_Common {
if(!$folder->setAttributeValue($dms->getAttributeDefinition($attrdefid), $attribute))
return false;
}
} elseif($attrdef->getMinValues() > 0) {
$this->errormsg = getMLText("attr_min_values", array("attrname"=>$attrdef->getName()));
} elseif(isset($oldattributes[$attrdefid])) {
if(!$folder->removeAttribute($dms->getAttributeDefinition($attrdefid)))
return false;