Merge "Made LoadBalancer debug log entries use "localhost" placeholder"
[lhc/web/wiklou.git] / includes / htmlform / HTMLTextAreaField.php
index 4fd1989..22e96f6 100644 (file)
@@ -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 );
        }
 }