OOUIHTMLForm: Make the submit button infusable
[lhc/web/wiklou.git] / includes / htmlform / OOUIHTMLForm.php
index 60e6366..056591a 100644 (file)
@@ -32,10 +32,10 @@ class OOUIHTMLForm extends HTMLForm {
        protected $mWrapperLegend = false;
 
        public function __construct( $descriptor, $context = null, $messagePrefix = '' ) {
+               parent::__construct( $descriptor, $context, $messagePrefix );
                $this->getOutput()->enableOOUI();
                $this->getOutput()->addModules( 'mediawiki.htmlform.ooui' );
                $this->getOutput()->addModuleStyles( 'mediawiki.htmlform.ooui.styles' );
-               parent::__construct( $descriptor, $context, $messagePrefix );
        }
 
        /**
@@ -54,7 +54,7 @@ class OOUIHTMLForm extends HTMLForm {
                $buttons = '';
 
                if ( $this->mShowSubmit ) {
-                       $attribs = array();
+                       $attribs = array( 'infusable' => true );
 
                        if ( isset( $this->mSubmitID ) ) {
                                $attribs['id'] = $this->mSubmitID;