From aed72678019b100c7cdda6b542b68186c4530e40 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 27 Nov 2013 18:07:36 +0000 Subject: [PATCH] If search option is set in template, don't override it with automatic chosen switch based on option count. --- etemplate/inc/class.etemplate_widget_menupopup.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_menupopup.inc.php b/etemplate/inc/class.etemplate_widget_menupopup.inc.php index 0da153e25a..0581bef789 100644 --- a/etemplate/inc/class.etemplate_widget_menupopup.inc.php +++ b/etemplate/inc/class.etemplate_widget_menupopup.inc.php @@ -174,8 +174,8 @@ class etemplate_widget_menupopup extends etemplate_widget { self::fix_encoded_options(self::$request->sel_options[$options]); - // Turn on search, if there's a lot of rows - if(count(self::$request->sel_options[$options]) >= self::SEARCH_ROW_LIMIT) + // Turn on search, if there's a lot of rows (unless explicitly set) + if(!array_key_exists('search',$this->attrs) && count(self::$request->sel_options[$options]) >= self::SEARCH_ROW_LIMIT) { self::setElementAttribute($form_name, "search", true); }