X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLTextAreaField.php;h=22e96f614e242a758fe60d28e4afe3c1ebb85847;hb=70a1ea48aa5f789d78d0f43c31049380f952ca8c;hp=21173d2a630f8313cc2607146b58ca9b6b5ac143;hpb=04d7d46b1d39340121698ba76fd8e433f60929c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php index 21173d2a63..22e96f614e 100644 --- a/includes/htmlform/HTMLTextAreaField.php +++ b/includes/htmlform/HTMLTextAreaField.php @@ -35,4 +35,33 @@ 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 new OOUI\TextInputWidget( array( + 'id' => $this->mID, + 'name' => $this->mName, + 'multiline' => true, + 'value' => $value, + ) + $attribs ); + } }