mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-22 13:58:40 +01:00
fix server-side validation to allow values of option children
This commit is contained in:
parent
d8cf78d045
commit
9a57fbaedd
@ -141,6 +141,12 @@ class Select extends Etemplate\Widget
|
|||||||
($this->attrs['rows'] && strpos($this->attrs['options'], $this->attrs['rows']) !== 0 ? $this->attrs['rows'].','.$this->attrs['options'] : $this->attrs['options']));
|
($this->attrs['rows'] && strpos($this->attrs['options'], $this->attrs['rows']) !== 0 ? $this->attrs['rows'].','.$this->attrs['options'] : $this->attrs['options']));
|
||||||
$allowed = array_merge($allowed2,array_keys($type_options));
|
$allowed = array_merge($allowed2,array_keys($type_options));
|
||||||
|
|
||||||
|
// add option children's values too, "" is not read, therefore we cast to string
|
||||||
|
foreach($this->children as $child)
|
||||||
|
{
|
||||||
|
if ($child->type == 'option') $allowed[] = (string)$child->attrs['value'];
|
||||||
|
}
|
||||||
|
|
||||||
if (!$this->attrs['multiple'] || !($this->attrs['options'] > 1)) $allowed[] = '';
|
if (!$this->attrs['multiple'] || !($this->attrs['options'] > 1)) $allowed[] = '';
|
||||||
|
|
||||||
foreach((array) $value as $val)
|
foreach((array) $value as $val)
|
||||||
|
Loading…
Reference in New Issue
Block a user