mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
fixed handling of optgroups, eg. notification chains in prefs
This commit is contained in:
parent
dbb4de0876
commit
243f20e98c
@ -288,15 +288,26 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
$values = array();
|
||||
foreach($options as $key => $val)
|
||||
{
|
||||
if (is_array($val) && isset($val['value']))
|
||||
if (is_array($val))
|
||||
{
|
||||
$values[] = $val['value'];
|
||||
if (isset($val['value']))
|
||||
{
|
||||
$values[] = $val['value'];
|
||||
}
|
||||
else // optgroup
|
||||
{
|
||||
foreach($val as $k => $v)
|
||||
{
|
||||
$values[] = is_array($v) && isset($v['value']) ? $v['value'] : $k;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$values[] = $key;
|
||||
}
|
||||
}
|
||||
//error_log(__METHOD__."('$name', TRUE) options=".array2string($options).' --> values='.array2string($values));
|
||||
$options = $values;
|
||||
}
|
||||
//error_log(__METHOD__."('$name') returning ".array2string($options));
|
||||
|
@ -684,7 +684,7 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
}
|
||||
else
|
||||
{
|
||||
this._appendOptionElement(key, _options[key][sub],undefined,group);
|
||||
this._appendOptionElement(sub, _options[key][sub],undefined,group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user