* @todo FIXME: If made 'required', only the text field should be compulsory.
*/
class HTMLSelectAndOtherField extends HTMLSelectField {
+ /** @var string[] */
+ private $mFlatOptions;
+
public function __construct( $params ) {
if ( array_key_exists( 'other', $params ) ) {
// Do nothing
'textinput' => $textAttribs,
'dropdowninput' => $dropdownInputAttribs,
'or' => false,
+ 'required' => $this->mParams[ 'required' ] ?? false,
'classes' => [ 'mw-htmlform-select-and-other-field' ],
'data' => [
'maxlengthUnit' => $this->mParams['maxlength-unit'] ?? 'bytes'