From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/htmlform/HTMLTextAreaField.php | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 includes/htmlform/HTMLTextAreaField.php (limited to 'includes/htmlform/HTMLTextAreaField.php') diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php new file mode 100644 index 00000000..21173d2a --- /dev/null +++ b/includes/htmlform/HTMLTextAreaField.php @@ -0,0 +1,38 @@ +mParams['cols'] ) ? $this->mParams['cols'] : static::DEFAULT_COLS; + } + + function getRows() { + return isset( $this->mParams['rows'] ) ? $this->mParams['rows'] : static::DEFAULT_ROWS; + } + + function getInputHTML( $value ) { + $attribs = array( + 'id' => $this->mID, + 'cols' => $this->getCols(), + 'rows' => $this->getRows(), + ) + $this->getTooltipAndAccessKey(); + + if ( $this->mClass !== '' ) { + $attribs['class'] = $this->mClass; + } + + $allowedParams = array( + 'placeholder', + 'tabindex', + 'disabled', + 'readonly', + 'required', + 'autofocus' + ); + + $attribs += $this->getAttributes( $allowedParams ); + return Html::textarea( $this->mName, $value, $attribs ); + } +} -- cgit v1.2.3-54-g00ecf