# TextInput
$textAttribs = [
- 'id' => $this->mID . '-other',
'name' => $this->mName . '-other',
'size' => $this->getSize(),
'class' => [ 'mw-htmlform-select-and-other-field' ],
- 'data-id-select' => $this->mID,
+ 'data-id-select' => $this->mID . '-select',
'value' => $value[2],
];
# DropdownInput
$dropdownInputAttribs = [
'name' => $this->mName,
- 'id' => $this->mID,
+ 'id' => $this->mID . '-select',
'options' => $this->getOptionsOOUI(),
'value' => $value[1],
];
}
return $this->getInputWidget( [
+ 'id' => $this->mID,
'textinput' => $textAttribs,
'dropdowninput' => $dropdownInputAttribs,
'or' => false,
# DropdownInput
$dropdownAttribs = [
- 'id' => $this->mID,
'name' => $this->mName,
'options' => $this->getOptionsOOUI(),
'value' => $valInSelect ? $value : 'other',
# TextInput
$textAttribs = [
- 'id' => $this->mID . '-other',
'name' => $this->mName . '-other',
'size' => $this->getSize(),
'value' => $valInSelect ? '' : $value,
}
return $this->getInputWidget( [
+ 'id' => $this->mID,
'textinput' => $textAttribs,
'dropdowninput' => $dropdownAttribs,
'or' => true,