/**
* Select dropdown field, with an additional "other" textbox.
+ *
+ * HTMLComboboxField implements the same functionality using a single form field
+ * and should be used instead.
*/
class HTMLSelectOrOtherField extends HTMLTextField {
function __construct( $params ) {
? $params['other']
: wfMessage( 'htmlform-selectorother-other' )->text();
// Have 'other' always as first element
- $this->mOptions = array( $msg => 'other' ) + $this->mOptions;
+ $this->mOptions = [ $msg => 'other' ] + $this->mOptions;
}
}
$select->setAttribute( 'class', 'mw-htmlform-select-or-other' );
- $tbAttribs = array( 'id' => $this->mID . '-other', 'size' => $this->getSize() );
+ $tbAttribs = [ 'id' => $this->mID . '-other', 'size' => $this->getSize() ];
if ( !empty( $this->mParams['disabled'] ) ) {
$select->setAttribute( 'disabled', 'disabled' );
return "$select<br />\n$textbox";
}
+ function getInputOOUI( $value ) {
+ return false;
+ }
+
/**
* @param WebRequest $request
*