mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-23 15:06:48 +00:00
Fix safe mode warning message
Use OOUI FieldLayout to display the warning properly. Bug: T376850 Change-Id: I1755dd8b1c7428d6e6468ec1f5e08bd7aabb77e2
This commit is contained in:
parent
1d38fe185d
commit
5974d068bd
|
@ -51,7 +51,9 @@ use MediaWiki\Title\TitleValue;
|
|||
use MediaWiki\User\Hook\UserGetDefaultOptionsHook;
|
||||
use MediaWiki\User\Options\UserOptionsLookup;
|
||||
use MediaWiki\User\User;
|
||||
use OOUI\FieldLayout;
|
||||
use OOUI\HtmlSnippet;
|
||||
use OOUI\MessageWidget;
|
||||
use Skin;
|
||||
use Wikimedia\Message\MessageSpecifier;
|
||||
use Wikimedia\Rdbms\IExpression;
|
||||
|
@ -176,9 +178,15 @@ class Hooks implements
|
|||
if ( $safeMode ) {
|
||||
$preferences['gadgets-safemode'] = [
|
||||
'type' => 'info',
|
||||
'default' => Html::warningBox( wfMessage( 'gadgets-prefstext-safemode' )->parse() ),
|
||||
'section' => 'gadgets',
|
||||
'raw' => true,
|
||||
'rawrow' => true,
|
||||
'default' => new FieldLayout(
|
||||
new MessageWidget( [
|
||||
'label' => new HtmlSnippet( wfMessage( 'gadgets-prefstext-safemode' )->parse() ),
|
||||
'type' => 'warning',
|
||||
] )
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue