# Apply the same CSS class used on the input to the message:
'cssclass' => $emailauthenticationclass,
);
- $defaultPreferences['emailaddress']['cssclass'] = $emailauthenticationclass;
}
}
'section' => 'rc/advancedrc',
);
+ if ( $config->get( 'RCWatchCategoryMembership' ) ) {
+ $defaultPreferences['hidecategorization'] = array(
+ 'type' => 'toggle',
+ 'label-message' => 'tog-hidecategorization',
+ 'section' => 'rc/advancedrc',
+ );
+ }
+
if ( $user->useRCPatrol() ) {
$defaultPreferences['hidepatrolled'] = array(
'type' => 'toggle',
'section' => 'watchlist/advancedwatchlist',
'label-message' => 'tog-watchlisthideliu',
);
+ $defaultPreferences['watchlistreloadautomatically'] = array(
+ 'type' => 'toggle',
+ 'section' => 'watchlist/advancedwatchlist',
+ 'label-message' => 'tog-watchlistreloadautomatically',
+ );
+
+ if ( $config->get( 'RCWatchCategoryMembership' ) ) {
+ $defaultPreferences['watchlisthidecategorization'] = array(
+ 'type' => 'toggle',
+ 'section' => 'watchlist/advancedwatchlist',
+ 'label-message' => 'tog-watchlisthidecategorization',
+ );
+ }
if ( $user->useRCPatrol() ) {
$defaultPreferences['watchlisthidepatrolled'] = array(
* @param IContextSource $context
* @param string $formClass
* @param array $remove Array of items to remove
- * @return HtmlForm
+ * @return PreferencesForm|HtmlForm
*/
static function getFormObject(
$user,
Hooks::run( 'PreferencesGetLegend', array( $this, $key, &$legend ) );
return $legend;
}
+
+ /**
+ * Get the keys of each top level preference section.
+ * @return array of section keys
+ */
+ function getPreferenceSections() {
+ return array_keys( array_filter( $this->mFieldTree, 'is_array' ) );
+ }
}