Merge "Drop zh-tw message "saveprefs""
[lhc/web/wiklou.git] / includes / htmlform / HTMLTextField.php
index 5c04ee2..157116d 100644 (file)
@@ -113,18 +113,17 @@ class HTMLTextField extends HTMLFormField {
                        'tabindex' => 'tabIndex',
                ) );
 
-               if ( isset( $attribs['readOnly'] ) ) {
-                       // This needs to be set to a boolean value
-                       $attribs['readOnly'] = true;
-               }
-
                $type = $this->getType( $attribs );
 
-               return new OOUI\TextInputWidget( array(
+               return $this->getInputWidget( array(
                        'id' => $this->mID,
                        'name' => $this->mName,
                        'value' => $value,
                        'type' => $type,
                ) + $attribs );
        }
+
+       protected function getInputWidget( $params ) {
+               return new OOUI\TextInputWidget( $params );
+       }
 }