From: Ed Sanders Date: Sat, 15 Apr 2017 12:56:48 +0000 (+0100) Subject: EditPage: Make input and button widgets infusable X-Git-Tag: 1.31.0-rc.0~3498^2 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=093126b71e293ffc37083e505fbfb80d7de2f02e;p=lhc%2Fweb%2Fwiklou.git EditPage: Make input and button widgets infusable This will allow gadget developers greater control, e.g. disabling. Change-Id: I9a21cd2dd3fc7695fc09632b844cc1afd0db0355 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index c19ed5e753..f97f16469a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3108,6 +3108,7 @@ class EditPage { return new OOUI\FieldLayout( new OOUI\TextInputWidget( [ 'value' => $summary, + 'infusable' => true, ] + $inputAttrs ), [ 'label' => new OOUI\HtmlSnippet( $labelText ), @@ -3672,6 +3673,7 @@ HTML 'href' => $this->getContextTitle()->getLinkUrl( $cancelParams ), 'label' => new OOUI\HtmlSnippet( $this->context->msg( 'cancel' )->parse() ), 'framed' => false, + 'infusable' => true, 'flags' => 'destructive', ] ); } else { @@ -4253,6 +4255,7 @@ HTML 'id' => $options['id'], 'name' => $name, 'selected' => $options['default'], + 'infusable' => true, ] ), [ 'align' => 'inline', @@ -4307,6 +4310,7 @@ HTML $buttons['save'] = new OOUI\ButtonInputWidget( [ 'flags' => [ 'constructive', 'primary' ], 'label' => $this->context->msg( $buttonLabelKey )->text(), + 'infusable' => true, 'type' => 'submit', ] + $saveConfig ); } else { @@ -4326,6 +4330,7 @@ HTML $previewConfig = OOUI\Element::configFromHtmlAttributes( $attribs ); $buttons['preview'] = new OOUI\ButtonInputWidget( [ 'label' => $this->context->msg( 'showpreview' )->text(), + 'infusable' => true, 'type' => 'submit' ] + $previewConfig ); } else { @@ -4343,6 +4348,7 @@ HTML $diffConfig = OOUI\Element::configFromHtmlAttributes( $attribs ); $buttons['diff'] = new OOUI\ButtonInputWidget( [ 'label' => $this->context->msg( 'showdiff' )->text(), + 'infusable' => true, 'type' => 'submit', ] + $diffConfig ); } else {