mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-29 01:59:39 +01:00
Better handling for options with more properties set (title, icon)
Previously they were being discarded
This commit is contained in:
parent
3c96eb9ce6
commit
53e5e45a5d
@ -194,8 +194,7 @@ export function find_select_options(widget, attr_options?, options : SelectOptio
|
|||||||
// @ts-ignore Yes, option.label.label is not supposed to exist but that's what we're checking
|
// @ts-ignore Yes, option.label.label is not supposed to exist but that's what we're checking
|
||||||
if(typeof option.label.label !== "undefined")
|
if(typeof option.label.label !== "undefined")
|
||||||
{
|
{
|
||||||
// @ts-ignore Yes, option.label.label is not supposed to exist but that's what we're checking
|
option = Object.assign(option, option.label);
|
||||||
option.label = option.label.label;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fixed_options.push(option);
|
fixed_options.push(option);
|
||||||
|
@ -144,7 +144,7 @@ class Select extends Etemplate\Widget
|
|||||||
{
|
{
|
||||||
$form_name = self::form_name($cname, $this->id, $expand);
|
$form_name = self::form_name($cname, $this->id, $expand);
|
||||||
$widget_type = $this->attrs['type'] ? $this->attrs['type'] : $this->type;
|
$widget_type = $this->attrs['type'] ? $this->attrs['type'] : $this->type;
|
||||||
$multiple = $this->attrs['multiple'] || $this->getElementAttribute($form_name, 'rows') > 1;
|
$multiple = $this->attrs['multiple'] || $this->getElementAttribute($form_name, 'multiple') || $this->getElementAttribute($form_name, 'rows') > 1;
|
||||||
|
|
||||||
$ok = true;
|
$ok = true;
|
||||||
if (!$this->is_readonly($cname, $form_name))
|
if (!$this->is_readonly($cname, $form_name))
|
||||||
@ -998,4 +998,6 @@ class Select extends Etemplate\Widget
|
|||||||
$response->data($options);
|
$response->data($options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Etemplate\Widget::registerWidget(__NAMESPACE__.'\\Select', array('selectbox', 'listbox', 'select', 'menupopup'));
|
|
||||||
|
Etemplate\Widget::registerWidget(__NAMESPACE__ . '\\Select', array('et2-select', 'selectbox', 'listbox', 'select',
|
||||||
|
'menupopup'));
|
Loading…
Reference in New Issue
Block a user