mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
check if attribute is aof type document or folder and multivalue
This commit is contained in:
parent
5235a859fc
commit
39ded6779d
|
@ -73,8 +73,13 @@ if ($action == "addattrdef") {
|
|||
if($minvalues > $maxvalues) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_min_greater_max"));
|
||||
}
|
||||
if($multiple && $valueset == '' && !in_array($type, array(SeedDMS_Core_AttributeDefinition::type_user, SeedDMS_Core_AttributeDefinition::type_group))) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_needs_valueset"));
|
||||
if($multiple) {
|
||||
if(in_array($type, array(SeedDMS_Core_AttributeDefinition::type_document, SeedDMS_Core_AttributeDefinition::type_folder))) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_but_doc_or_folder"));
|
||||
}
|
||||
if($valueset == '' && !in_array($type, array(SeedDMS_Core_AttributeDefinition::type_user, SeedDMS_Core_AttributeDefinition::type_group))) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_needs_valueset"));
|
||||
}
|
||||
}
|
||||
|
||||
$controller->setParam('name', $name);
|
||||
|
@ -150,8 +155,13 @@ else if ($action == "editattrdef") {
|
|||
if($minvalues > $maxvalues) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_min_greater_max"));
|
||||
}
|
||||
if($multiple && $valueset == '' && !in_array($type, array(SeedDMS_Core_AttributeDefinition::type_user, SeedDMS_Core_AttributeDefinition::type_group))) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_needs_valueset"));
|
||||
if($multiple) {
|
||||
if(in_array($type, array(SeedDMS_Core_AttributeDefinition::type_document, SeedDMS_Core_AttributeDefinition::type_folder))) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_but_doc_or_folder"));
|
||||
}
|
||||
if($valueset == '' && !in_array($type, array(SeedDMS_Core_AttributeDefinition::type_user, SeedDMS_Core_AttributeDefinition::type_group))) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_needs_valueset"));
|
||||
}
|
||||
}
|
||||
|
||||
$controller->setParam('name', $name);
|
||||
|
|
Loading…
Reference in New Issue
Block a user