From: Alexandre Emsenhuber Date: Sun, 6 Jul 2014 18:51:17 +0000 (+0200) Subject: Allow "size" attribute to HTMLSelectField X-Git-Tag: 1.31.0-rc.0~15075 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=f90b19bf036bc8ee016aaf5a2ef39633bb03b498;p=lhc%2Fweb%2Fwiklou.git Allow "size" attribute to HTMLSelectField Pass this one to XmlSelect is provided. Change-Id: I7ac345e1c219c8607895f9fc0fc2cef68c900ff8 --- 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 !== '' ) {