mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
check if attribute def. has value set if multiple is set
This commit is contained in:
parent
d835aa84fe
commit
43e6583db9
|
@ -63,6 +63,9 @@ if ($action == "addattrdef") {
|
|||
if($minvalues > $maxvalues) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_min_greater_max"));
|
||||
}
|
||||
if($multiple && $valueset == '') {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_needs_valueset"));
|
||||
}
|
||||
|
||||
$newAttrdef = $dms->addAttributeDefinition($name, $objtype, $type, $multiple, $minvalues, $maxvalues, $valueset, $regex);
|
||||
if (!$newAttrdef) {
|
||||
|
@ -137,6 +140,9 @@ else if ($action == "editattrdef") {
|
|||
if($minvalues > $maxvalues) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_min_greater_max"));
|
||||
}
|
||||
if($multiple && $valueset == '') {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("attrdef_multiple_needs_valueset"));
|
||||
}
|
||||
|
||||
if (!$attrdef->setName($name)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user