mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 17:40:12 +00:00
Merge "Use field name for the hide-if statement"
This commit is contained in:
commit
863cdc34bf
|
@ -428,8 +428,8 @@ class Hooks {
|
|||
// Only show this section when the Vector skin is checked. The JavaScript client also uses
|
||||
// this state to determine whether to show or hide the whole section.
|
||||
// If migration mode is enabled, the section is always hidden.
|
||||
'hide-if' => self::isMigrationMode() ? [ '!==', 'wpskin', '0' ] :
|
||||
[ '!==', 'wpskin', Constants::SKIN_NAME_LEGACY ],
|
||||
'hide-if' => self::isMigrationMode() ? [ '!==', 'skin', '0' ] :
|
||||
[ '!==', 'skin', Constants::SKIN_NAME_LEGACY ],
|
||||
],
|
||||
Constants::PREF_KEY_SIDEBAR_VISIBLE => [
|
||||
'type' => 'api',
|
||||
|
|
|
@ -72,7 +72,7 @@ class HTMLLegacySkinVersionFieldTest extends \MediaWikiIntegrationTestCase {
|
|||
'label-message' => 'prefs-vector-enable-vector-1-label',
|
||||
'help-message' => 'prefs-vector-enable-vector-1-help',
|
||||
'default' => true,
|
||||
'hide-if' => [ '!==', 'wpskin', Constants::SKIN_NAME_LEGACY ],
|
||||
'hide-if' => [ '!==', 'skin', Constants::SKIN_NAME_LEGACY ],
|
||||
];
|
||||
$skinVersionField = new HTMLLegacySkinVersionField( $params );
|
||||
$checkField = new \HTMLCheckField( $params );
|
||||
|
|
|
@ -17,7 +17,7 @@ use Vector\HTMLForm\Fields\HTMLLegacySkinVersionField;
|
|||
* @coversDefaultClass \Vector\Hooks
|
||||
*/
|
||||
class VectorHooksTest extends MediaWikiIntegrationTestCase {
|
||||
private const HIDE_IF = [ '!==', 'wpskin', Constants::SKIN_NAME_LEGACY ];
|
||||
private const HIDE_IF = [ '!==', 'skin', Constants::SKIN_NAME_LEGACY ];
|
||||
|
||||
private const SKIN_PREFS_SECTION = 'rendering/skin/skin-prefs';
|
||||
|
||||
|
|
Loading…
Reference in a new issue