Fix Et2SelectEmail search queried wrong URL

broken by 5a20f5965e
This commit is contained in:
nathan 2022-09-16 10:38:37 -06:00
parent 30c3000e87
commit 12ab9b72a1

View File

@ -228,13 +228,17 @@ function send_template()
$attrs['editModeEnabled'] = 'true'; $attrs['editModeEnabled'] = 'true';
} }
} }
$attrs['searchUrl'] = $attrs['autocomplete_url'] ?? 'EGroupware\\Api\\Etemplate\\Widget\\Taglist::ajax_search'; if(isset($attrs['autocomplete_url']))
if (isset($attrs['autocomplete_params'])) {
$attrs['searchUrl'] = $attrs['autocomplete_url'];
}
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']);
} }