class HTMLSelectAndOtherField extends HTMLSelectField {
function __construct( $params ) {
if ( array_key_exists( 'other', $params ) ) {
+ // Do nothing
} elseif ( array_key_exists( 'other-message', $params ) ) {
$params['other'] = wfMessage( $params['other-message'] )->plain();
} else {
parent::__construct( $params );
if ( $this->getOptions() === null ) {
- # Sulk
+ // Sulk
throw new MWException( 'HTMLSelectAndOtherField called without any options' );
}
if ( !in_array( 'other', $this->mOptions, true ) ) {
return "$select<br />\n$textbox";
}
+ function getInputOOUI( $value ) {
+ return false;
+ }
+
/**
* @param WebRequest $request
*
*/
function loadDataFromRequest( $request ) {
if ( $request->getCheck( $this->mName ) ) {
-
$list = $request->getText( $this->mName );
$text = $request->getText( $this->mName . '-other' );