Merge "Module storage: set stricter storage quotas on Firefox"
[lhc/web/wiklou.git] / includes / htmlform / HTMLAutoCompleteSelectField.php
index 4905362..fc19d9a 100644 (file)
@@ -5,6 +5,9 @@
  * auto-completion and optionally with a select dropdown for selecting common
  * options.
  *
+ * HTMLComboboxField implements most of the same functionality and should be
+ * used instead, if possible.
+ *
  * If one of 'options-messages', 'options', or 'options-message' is provided
  * and non-empty, the select dropdown will be shown. An 'other' key will be
  * appended using message 'htmlform-selectorother-other' if not already
@@ -22,7 +25,6 @@
  *   other-message - Message to use instead of htmlform-selectorother-other for
  *      the 'other' message.
  *   other - Raw text to use for the 'other' message
- *
  */
 class HTMLAutoCompleteSelectField extends HTMLTextField {
        protected $autocomplete = array();
@@ -98,11 +100,12 @@ class HTMLAutoCompleteSelectField extends HTMLTextField {
                return true;
        }
 
-       function getAttributes( array $list ) {
+       // FIXME Ewww, this shouldn't be adding any attributes not requested in $list :(
+       public function getAttributes( array $list, array $mappings = null ) {
                $attribs = array(
                        'type' => 'text',
                        'data-autocomplete' => FormatJson::encode( array_keys( $this->autocomplete ) ),
-               ) + parent::getAttributes( $list );
+               ) + parent::getAttributes( $list, $mappings );
 
                if ( $this->getOptions() ) {
                        $attribs['data-hide-if'] = FormatJson::encode(
@@ -162,4 +165,13 @@ class HTMLAutoCompleteSelectField extends HTMLTextField {
                return $ret;
        }
 
+       /**
+        * Get the OOUI version of this input.
+        * @param string $value
+        * @return false
+        */
+       function getInputOOUI( $value ) {
+               // To be implemented, for now override the function from HTMLTextField
+               return false;
+       }
 }