From 12ab9b72a1e8b6a53162e9ac1d9c70b658e5ad43 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 16 Sep 2022 10:38:37 -0600 Subject: [PATCH] Fix Et2SelectEmail search queried wrong URL broken by 5a20f5965e060db9bbd16bdb457ca5e0e72948cc --- api/etemplate.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api/etemplate.php b/api/etemplate.php index 144271439b..c55cd3777f 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -228,13 +228,17 @@ function send_template() $attrs['editModeEnabled'] = 'true'; } } - $attrs['searchUrl'] = $attrs['autocomplete_url'] ?? 'EGroupware\\Api\\Etemplate\\Widget\\Taglist::ajax_search'; - if (isset($attrs['autocomplete_params'])) + if(isset($attrs['autocomplete_url'])) + { + $attrs['searchUrl'] = $attrs['autocomplete_url']; + } + + if(isset($attrs['autocomplete_params'])) { $attrs['searchOptions'] = $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']); }