X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLTextAreaField.php;h=22e96f614e242a758fe60d28e4afe3c1ebb85847;hb=70a1ea48aa5f789d78d0f43c31049380f952ca8c;hp=4fd198976bbab115dfd9b5a0272ceeb3d4a71870;hpb=db935aaf2930ef29adab1fce2291ecef7875f464;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php index 4fd198976b..22e96f614e 100644 --- a/includes/htmlform/HTMLTextAreaField.php +++ b/includes/htmlform/HTMLTextAreaField.php @@ -15,7 +15,6 @@ class HTMLTextAreaField extends HTMLFormField { function getInputHTML( $value ) { $attribs = array( 'id' => $this->mID, - 'name' => $this->mName, 'cols' => $this->getCols(), 'rows' => $this->getRows(), ) + $this->getTooltipAndAccessKey(); @@ -34,7 +33,35 @@ class HTMLTextAreaField extends HTMLFormField { ); $attribs += $this->getAttributes( $allowedParams ); + return Html::textarea( $this->mName, $value, $attribs ); + } + + function getInputOOUI( $value ) { + $attribs = $this->getTooltipAndAccessKey(); + + if ( $this->mClass !== '' ) { + $attribs['classes'] = array( $this->mClass ); + } + + $allowedParams = array( + 'placeholder', + 'tabindex', + 'disabled', + 'readonly', + 'required', + 'autofocus', + ); + + $attribs += $this->getAttributes( $allowedParams, array( + 'tabindex' => 'tabIndex', + 'readonly' => 'readOnly', + ) ); - return Html::element( 'textarea', $attribs, $value ); + return new OOUI\TextInputWidget( array( + 'id' => $this->mID, + 'name' => $this->mName, + 'multiline' => true, + 'value' => $value, + ) + $attribs ); } }