TopQuickSearch: Syntax Logik bei den Userpreferences. with_empty bei der
authorWerner Hahn <wh@futureworldsearch.net>
Tue, 25 Sep 2018 10:48:00 +0000 (12:48 +0200)
committerWerner Hahn <wh@futureworldsearch.net>
Tue, 25 Sep 2018 12:39:24 +0000 (14:39 +0200)
Auswahl

SL/Controller/TopQuickSearch.pm
templates/webpages/am/config.html

index 8b47080..f44ff6f 100644 (file)
@@ -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 {
index e215590..038639a 100644 (file)
         <div class="clearfix">
          [% 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")) %]
         </div>
       </td>