From: Kunal Mehta Date: Wed, 8 Jul 2015 01:27:03 +0000 (-0700) Subject: HTMLTextAreaField: Honor 'rows' setting in OOUI format X-Git-Tag: 1.31.0-rc.0~10853^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=f773b2419ba3e8587edf4980de39e14f70a7c783;p=lhc%2Fweb%2Fwiklou.git HTMLTextAreaField: Honor 'rows' setting in OOUI format And throw an exception if 'cols' is set, since it won't work. Requires eed0f5294b0080 in OOUI. Bug: T104682 Change-Id: I8e09402a01cecac8a90497d31b3b1ca15ff2d949 --- diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php index e4f78b25fa..aeb4b7c22a 100644 --- a/includes/htmlform/HTMLTextAreaField.php +++ b/includes/htmlform/HTMLTextAreaField.php @@ -47,6 +47,10 @@ class HTMLTextAreaField extends HTMLFormField { } function getInputOOUI( $value ) { + if ( isset( $this->mParams['cols'] ) ) { + throw new Exception( "OOUIHTMLForm does not support the 'cols' parameter for textareas" ); + } + $attribs = $this->getTooltipAndAccessKey(); if ( $this->mClass !== '' ) { @@ -72,6 +76,7 @@ class HTMLTextAreaField extends HTMLFormField { 'name' => $this->mName, 'multiline' => true, 'value' => $value, + 'rows' => $this->getRows(), ) + $attribs ); } }