…also HTMLSelectAndOtherField and HTMLSelectOrOtherField now
pass the 'disabled' field when creating the input widget.
The OOUI versions of these HTMLFormFields would get enabled
right after infusion even they were disabled in PHP. This
makes sure that they remain disabled.
Change-Id: Iddd8ad81731dba7bdcb599d6fe104cb259b11733
$dropdownInputAttribs['classes'] = [ $this->mClass ];
}
+ $disabled = false;
+ if ( isset( $this->mParams[ 'disabled' ] ) && $this->mParams[ 'disabled' ] ) {
+ $disabled = true;
+ }
+
return $this->getInputWidget( [
'id' => $this->mID,
+ 'disabled' => $disabled,
'textinput' => $textAttribs,
'dropdowninput' => $dropdownInputAttribs,
'or' => false,
$textAttribs['placeholder'] = $this->mPlaceholder;
}
+ $disabled = false;
+ if ( isset( $this->mParams[ 'disabled' ] ) && $this->mParams[ 'disabled' ] ) {
+ $disabled = true;
+ }
+
return $this->getInputWidget( [
'id' => $this->mID,
+ 'disabled' => $disabled,
'textinput' => $textAttribs,
'dropdowninput' => $dropdownAttribs,
'or' => true,
$config
);
+ if ( isset( $config['disabled'] ) && $config['disabled'] == true ) {
+ $config['textinput']['disabled'] = true;
+ $config['dropdowninput']['disabled'] = true;
+ }
+
parent::__construct( $config );
// Properties