set correct default search-url for taglist-email

This commit is contained in:
ralf 2022-09-17 09:50:57 +02:00
parent 1deeee207f
commit a9f8e6fcd5

View File

@ -228,17 +228,14 @@ function send_template()
$attrs['editModeEnabled'] = 'true'; $attrs['editModeEnabled'] = 'true';
} }
} }
if(isset($attrs['autocomplete_url'])) $attrs['searchUrl'] = $attrs['autocomplete_url'] ?? 'EGroupware\\Api\\Etemplate\\Widget\\Taglist::'.
{ ($matches[2] === '-email' ? 'ajax_email' : 'ajax_search');
$attrs['searchUrl'] = $attrs['autocomplete_url']; if (isset($attrs['autocomplete_params']))
}
if(isset($attrs['autocomplete_params']))
{ {
$attrs['searchOptions'] = $attrs['autocomplete_params']; $attrs['searchOptions'] = $attrs['autocomplete_params'];
} }
unset($attrs['autocomplete_url'], $attrs['autocomplete_params']); unset($attrs['autocomplete_url'], $attrs['autocomplete_params']);
if(isset($attrs['maxSelection']) && $attrs['maxSelection'] === '1') if (isset($attrs['maxSelection']) && $attrs['maxSelection'] === '1')
{ {
unset($attrs['multiple'], $attrs['maxSelection']); unset($attrs['multiple'], $attrs['maxSelection']);
} }