From 7a7030e063403a1c09bbb38c22881b5614d4475e Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Fri, 17 Jan 2014 06:38:41 +0400 Subject: [PATCH 1/2] BaseHtml::listBox() default size settings removed --- framework/helpers/BaseHtml.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 0df9fbf7ea..c4cdabeee6 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -718,9 +718,6 @@ class BaseHtml */ public static function listBox($name, $selection = null, $items = [], $options = []) { - if (!isset($options['size'])) { - $options['size'] = 4; - } if (!empty($options['multiple']) && substr($name, -2) !== '[]') { $name .= '[]'; } From f645368e75f686bd7530d8055fa64ba456d3268a Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Fri, 17 Jan 2014 07:18:25 +0400 Subject: [PATCH 2/2] BaseHtml::listBox() allow to remove size attribute --- framework/helpers/BaseHtml.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index c4cdabeee6..4de696d210 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -718,6 +718,9 @@ class BaseHtml */ public static function listBox($name, $selection = null, $items = [], $options = []) { + if (!array_key_exists($options, 'size')) { + $options['size'] = 4; + } if (!empty($options['multiple']) && substr($name, -2) !== '[]') { $name .= '[]'; }