From: Bartosz DziewoƄski Date: Tue, 30 Apr 2019 00:10:16 +0000 (+0200) Subject: HTMLFormFieldWithButton: Don't pass empty string as 'id' X-Git-Tag: 1.34.0-rc.0~1845^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=4d9a9f3776a7b8589367ba5f8dda7b62b2a410e0;p=lhc%2Fweb%2Fwiklou.git HTMLFormFieldWithButton: Don't pass empty string as 'id' The button must have an ID to be able to be infused. If the given ID is null, that's fine, OOUI will generate one. But passing an empty string apparently disables that. Bug: T222013 Change-Id: I96e1f838385c5539ed246d2ee7107cd037a5f338 --- diff --git a/includes/htmlform/fields/HTMLFormFieldWithButton.php b/includes/htmlform/fields/HTMLFormFieldWithButton.php index 93f5363d7b..be8f7d886c 100644 --- a/includes/htmlform/fields/HTMLFormFieldWithButton.php +++ b/includes/htmlform/fields/HTMLFormFieldWithButton.php @@ -59,7 +59,7 @@ class HTMLFormFieldWithButton extends HTMLFormField { 'type' => $this->mButtonType, 'label' => $this->mButtonValue, 'flags' => $this->mButtonFlags, - 'id' => $this->mButtonId, + 'id' => $this->mButtonId ?: null, ] + OOUI\Element::configFromHtmlAttributes( $this->getAttributes( [ 'disabled', 'tabindex' ] ) ) );