13 if ( !in_array(
'other', $this->mOptions,
true ) ) {
17 :
wfMessage(
'htmlform-selectorother-other' )->text();
28 $valInSelect = in_array(
33 $selected = $valInSelect ?
$value :
'other';
35 $select =
new XmlSelect( $this->mName, $this->mID, $selected );
38 $select->setAttribute(
'class',
'mw-htmlform-select-or-other' );
40 $tbAttribs = [
'id' => $this->mID .
'-other',
'size' => $this->
getSize() ];
42 if ( !empty( $this->mParams[
'disabled'] ) ) {
43 $select->setAttribute(
'disabled',
'disabled' );
44 $tbAttribs[
'disabled'] =
'disabled';
47 if ( isset( $this->mParams[
'tabindex'] ) ) {
48 $select->setAttribute(
'tabindex', $this->mParams[
'tabindex'] );
49 $tbAttribs[
'tabindex'] = $this->mParams[
'tabindex'];
52 $select = $select->getHTML();
54 if ( isset( $this->mParams[
'maxlength'] ) ) {
55 $tbAttribs[
'maxlength'] = $this->mParams[
'maxlength'];
58 if ( $this->mClass !==
'' ) {
62 $textbox = Html::input( $this->mName .
'-other', $valInSelect ?
'' :
$value,
'text', $tbAttribs );
64 return "$select<br />\n$textbox";
72 return [
'mediawiki.widgets.SelectWithInputWidget' ];
76 $this->mParent->getOutput()->addModuleStyles(
'mediawiki.widgets.SelectWithInputWidget.styles' );
81 $valInSelect = in_array(
90 'value' => $valInSelect ?
$value :
'other',
91 'class' => [
'mw-htmlform-select-or-other' ],
99 $dropdownAttribs += OOUI\Element::configFromHtmlAttributes(
105 'name' => $this->mName .
'-other',
107 'value' => $valInSelect ?
'' :
$value,
119 $textAttribs += OOUI\Element::configFromHtmlAttributes(
123 if ( $this->mClass !==
'' ) {
126 if ( $this->mPlaceholder !==
'' ) {
132 'textinput' => $textAttribs,
133 'dropdowninput' => $dropdownAttribs,
148 if (
$request->getCheck( $this->mName ) ) {
149 $val =
$request->getText( $this->mName );
151 if ( $val ===
'other' ) {
152 $val =
$request->getText( $this->mName .
'-other' );
Select dropdown field, with an additional "other" textbox.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
getOOUIModules()
Get the list of extra ResourceLoader modules which must be loaded client-side before it's possible to...
getInputOOUI( $value)
Same as getInputHTML, but returns an OOUI object.
loadDataFromRequest( $request)
shouldInfuseOOUI()
Whether the field should be automatically infused.
Class for generating HTML <select> or <datalist> elements.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services