forked from extern/egroupware
fix mail preferences could not be saved
This commit is contained in:
parent
e8a93ab782
commit
bb28500ef7
@ -151,6 +151,7 @@ class Select extends Etemplate\Widget
|
||||
$widget_type = substr($widget_type, 4);
|
||||
}
|
||||
$multiple = $this->attrs['multiple'] || $this->getElementAttribute($form_name, 'multiple') || $this->getElementAttribute($form_name, 'rows') > 1;
|
||||
$allowFreeEntries = $this->attrs['allowFreeEntries'] || $this->getElementAttribute($form_name, 'allowFreeEntries');
|
||||
|
||||
$ok = true;
|
||||
if (!$this->is_readonly($cname, $form_name))
|
||||
@ -178,7 +179,7 @@ class Select extends Etemplate\Widget
|
||||
if ((string)$val === '' && in_array('', $allowed)) continue;
|
||||
|
||||
// no validation, for allowFreeEntries="true"
|
||||
if (!empty($this->attrs['allowFreeEntries']) && $this->attrs['allowFreeEntries'] !== 'false')
|
||||
if ($allowFreeEntries)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -488,9 +488,9 @@ class preferences_settings
|
||||
if($setting['no_sel_options'])
|
||||
{
|
||||
$tpl->setElementAttribute($tab . '[' . $setting['name'] . ']', 'autocomplete_url', '');
|
||||
$tpl->setElementAttribute($tab . '[' . $setting['name'] . ']', 'allowFreeEntries', true);
|
||||
}
|
||||
$setting['type'] = 'et2-select';
|
||||
$setting['multiple'] = true;
|
||||
$tpl->setElementAttribute($tab . '[' . $setting['name'] . ']', 'multiple', true);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user