forked from extern/egroupware
Fix selects without empty_label were not allowed to be empty in some cases, even without required=true
For example select-account multiple=true, or customfield select-account with rows > 1 would give error "'' is NOT allowed ('not found')"
This commit is contained in:
parent
d133683272
commit
00c9550465
@ -171,7 +171,8 @@ class Select extends Etemplate\Widget
|
||||
}
|
||||
$allowed = array_map('strval', $allowed);
|
||||
|
||||
if (!$multiple || $this->attrs['multiple'] === "dynamic") $allowed[] = '';
|
||||
// Add empty as an option, we check for required value later
|
||||
$allowed[] = '';
|
||||
|
||||
foreach((array) $value as $val)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user