mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:38:53 +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
|
||||
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.label = option.label.label;
|
||||
option = Object.assign(option, option.label);
|
||||
}
|
||||
}
|
||||
fixed_options.push(option);
|
||||
|
@ -144,7 +144,7 @@ class Select extends Etemplate\Widget
|
||||
{
|
||||
$form_name = self::form_name($cname, $this->id, $expand);
|
||||
$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;
|
||||
if (!$this->is_readonly($cname, $form_name))
|
||||
@ -998,4 +998,6 @@ class Select extends Etemplate\Widget
|
||||
$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