X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLFormFieldWithButton.php;h=bcb07bd1c2e6f58f7fff6d7e38804f2ccb434e45;hb=6bcdf27c748d70369ff301a5f586fd6a9e2f09a7;hp=6b02c49d43ee0022a675b670ea70923e71ffe38c;hpb=0ea03a7f56070956838ab360a5dccc2a506fc4ff;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLFormFieldWithButton.php b/includes/htmlform/HTMLFormFieldWithButton.php index 6b02c49d43..bcb07bd1c2 100644 --- a/includes/htmlform/HTMLFormFieldWithButton.php +++ b/includes/htmlform/HTMLFormFieldWithButton.php @@ -19,7 +19,7 @@ class HTMLFormFieldWithButton extends HTMLFormField { protected $mButtonValue; /** @var string $mButtonType Value for the button in this field */ - protected $mButtonFlags = array( 'primary', 'progressive' ); + protected $mButtonFlags = [ 'progressive' ]; public function __construct( $info ) { if ( isset( $info['buttonclass'] ) ) { @@ -44,21 +44,23 @@ class HTMLFormFieldWithButton extends HTMLFormField { } public function getInputHTML( $value ) { - $attr = array( + $attr = [ 'class' => 'mw-htmlform-submit ' . $this->mButtonClass, 'id' => $this->mButtonId, - ) + $this->getAttributes( array( 'disabled', 'tabindex' ) ); + ] + $this->getAttributes( [ 'disabled', 'tabindex' ] ); return Html::input( $this->mButtonName, $this->mButtonValue, $this->mButtonType, $attr ); } public function getInputOOUI( $value ) { - return new OOUI\ButtonInputWidget( array( + return new OOUI\ButtonInputWidget( [ 'name' => $this->mButtonName, 'value' => $this->mButtonValue, 'type' => $this->mButtonType, 'label' => $this->mButtonValue, 'flags' => $this->mButtonFlags, + ] + OOUI\Element::configFromHtmlAttributes( + $this->getAttributes( [ 'disabled', 'tabindex' ] ) ) ); }