From 497da0ff32257cd249c8c60991f8aaebd92f409c Mon Sep 17 00:00:00 2001 From: Werner Hahn Date: Tue, 25 Sep 2018 12:48:00 +0200 Subject: [PATCH] TopQuickSearch: Syntax Logik bei den Userpreferences. with_empty bei der Auswahl --- SL/Controller/TopQuickSearch.pm | 3 +-- templates/webpages/am/config.html | 13 +++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SL/Controller/TopQuickSearch.pm b/SL/Controller/TopQuickSearch.pm index 8b4708031..f44ff6f49 100644 --- a/SL/Controller/TopQuickSearch.pm +++ b/SL/Controller/TopQuickSearch.pm @@ -71,8 +71,7 @@ sub enabled_modules { ); my %enabled_names; - if ($user_prefs) { - my $prefs_val = $user_prefs->get('quick_search_modules'); + if (my $prefs_val = $user_prefs->get('quick_search_modules')) { my @quick_search_modules = split ',', $prefs_val; %enabled_names = map { diff --git a/templates/webpages/am/config.html b/templates/webpages/am/config.html index e215590e5..038639abe 100644 --- a/templates/webpages/am/config.html +++ b/templates/webpages/am/config.html @@ -169,12 +169,13 @@
[% L.select_tag("quick_search_modules[]", ENABLED_QUICK_SEARCHMODULES, - value_key = "name", - title_key = "description_config", - id = "quick_searches", - multiple = 1, - size = ENABLED_QUICK_SEARCHMODULES.size, - default = DEFAULT_QUICK_SEARCHMODULES) %] + value_key = "name", + title_key = "description_config", + id = "quick_searches", + multiple = 1, + with_empty = 1 + size = ENABLED_QUICK_SEARCHMODULES.size, + default = DEFAULT_QUICK_SEARCHMODULES) %] [% # L.multiselect2side("quick_searches", labelsx=LxERP.t8("All modules"), labeldx=LxERP.t8("Enabled modules")) %]
-- 2.20.1