Merge ""spellcheck" attribute for HTMLForm "text" and "textarea""
[lhc/web/wiklou.git] / includes / htmlform / HTMLTextAreaField.php
index ba9707d..a4ed95f 100644 (file)
@@ -45,4 +45,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 );
+       }
 }