Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / includes / htmlform / HTMLFormField.php
index 0fab033..13756e3 100644 (file)
@@ -920,7 +920,7 @@ abstract class HTMLFormField {
         * @return array Attributes
         */
        public function getAttributes( array $list, array $mappings = null ) {
-               static $boolAttribs = array( 'disabled', 'required', 'multiple', 'readonly' );
+               static $boolAttribs = array( 'disabled', 'required', 'autofocus', 'multiple', 'readonly' );
 
                $ret = array();
                foreach ( $list as $key ) {
@@ -928,7 +928,7 @@ abstract class HTMLFormField {
 
                        if ( in_array( $key, $boolAttribs ) ) {
                                if ( !empty( $this->mParams[$key] ) ) {
-                                       $ret[$mappedKey] = '';
+                                       $ret[$mappedKey] = $mappedKey;
                                }
                        } elseif ( isset( $this->mParams[$key] ) ) {
                                $ret[$mappedKey] = $this->mParams[$key];