fix mail preferences could not be saved

This commit is contained in:
ralf 2022-08-05 20:20:46 +02:00
parent e8a93ab782
commit bb28500ef7
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}