Merge "Convert Special:NewFiles to use OOUI."
[lhc/web/wiklou.git] / includes / htmlform / HTMLFormFieldWithButton.php
index 272af15..bcb07bd 100644 (file)
@@ -19,7 +19,7 @@ class HTMLFormFieldWithButton extends HTMLFormField {
        protected $mButtonValue;
 
        /** @var string $mButtonType Value for the button in this field */
-       protected $mButtonFlags = [ 'primary', 'progressive' ];
+       protected $mButtonFlags = [ 'progressive' ];
 
        public function __construct( $info ) {
                if ( isset( $info['buttonclass'] ) ) {
@@ -59,7 +59,9 @@ class HTMLFormFieldWithButton extends HTMLFormField {
                        'type' => $this->mButtonType,
                        'label' => $this->mButtonValue,
                        'flags' => $this->mButtonFlags,
-               ] );
+               ] + OOUI\Element::configFromHtmlAttributes(
+                       $this->getAttributes( [ 'disabled', 'tabindex' ] )
+               ) );
        }
 
        /**