mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-27 16:39:59 +00:00
Merge "Simplify code that generates different error messages"
This commit is contained in:
commit
1f08bd8abc
|
@ -88,12 +88,11 @@ class InputBox {
|
|||
case 'search2':
|
||||
return $this->getSearchForm2();
|
||||
default:
|
||||
$key = $this->mType === '' ? 'inputbox-error-no-type' : 'inputbox-error-bad-type';
|
||||
return Xml::tags( 'div', null,
|
||||
Xml::element( 'strong',
|
||||
[ 'class' => 'error' ],
|
||||
strlen( $this->mType ) > 0
|
||||
? wfMessage( 'inputbox-error-bad-type', $this->mType )->text()
|
||||
: wfMessage( 'inputbox-error-no-type' )->text()
|
||||
wfMessage( $key, $this->mType )->text()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue