Merge "StringUtils: Add a utility for checking if a string is a valid regex"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLSelectAndOtherField.php
index 85cbbb1..05ab0bb 100644 (file)
@@ -11,6 +11,9 @@
  * @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
@@ -130,6 +133,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
                        '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'