From f90b19bf036bc8ee016aaf5a2ef39633bb03b498 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 6 Jul 2014 20:51:17 +0200 Subject: [PATCH] Allow "size" attribute to HTMLSelectField Pass this one to XmlSelect is provided. Change-Id: I7ac345e1c219c8607895f9fc0fc2cef68c900ff8 --- includes/htmlform/HTMLSelectField.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/HTMLSelectField.php b/includes/htmlform/HTMLSelectField.php index c32b445157..2bf9f8b82f 100644 --- a/includes/htmlform/HTMLSelectField.php +++ b/includes/htmlform/HTMLSelectField.php @@ -27,8 +27,10 @@ class HTMLSelectField extends HTMLFormField { $select->setAttribute( 'disabled', 'disabled' ); } - if ( isset( $this->mParams['tabindex'] ) ) { - $select->setAttribute( 'tabindex', $this->mParams['tabindex'] ); + $allowedParams = array( 'tabindex', 'size' ); + $customParams = $this->getAttributes( $allowedParams ); + foreach( $customParams as $name => $value ) { + $select->setAttribute( $name, $value ); } if ( $this->mClass !== '' ) { -- 2.20.1