$defaultPreferences['watchlisttoken'] = [
'type' => 'api',
];
+
+ $tokenButton = new OOUI\ButtonWidget( [
+ 'href' => SpecialPage::getTitleFor( 'ResetTokens' )->getLinkURL( [
+ 'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText()
+ ] ),
+ 'label' => $context->msg( 'prefs-watchlist-managetokens' )->text(),
+ ] );
$defaultPreferences['watchlisttoken-info'] = [
'type' => 'info',
'section' => 'watchlist/tokenwatchlist',
'label-message' => 'prefs-watchlist-token',
- 'default' => $user->getTokenFromOption( 'watchlisttoken' ),
- 'help-message' => 'prefs-help-watchlist-token2',
- ];
- $defaultPreferences['watchlisttoken-info2'] = [
- 'type' => 'info',
- 'section' => 'watchlist/tokenwatchlist',
+ 'help-message' => 'prefs-help-tokenmanagement',
'raw' => true,
- 'default' => $context->msg( 'prefs-help-watchlist-token2' )->parse(),
+ 'default' => (string)$tokenButton,
];
}
}
public function alterForm( HTMLForm $form ) {
$resetRoutes = $this->getConfig()->get( 'PasswordResetRoutes' );
+ $form->setSubmitDestructive();
+
$form->addHiddenFields( $this->getRequest()->getValues( 'returnto', 'returntoquery' ) );
$i = 0;
* @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
+ $form->setSubmitDestructive();
if ( $this->getTokensList() ) {
$form->setSubmitTextMsg( 'resettokens-resetbutton' );
} else {
"prefs-watchlist-edits": "Maximum number of changes to show in watchlist:",
"prefs-watchlist-edits-max": "Maximum number: 1000",
"prefs-watchlist-token": "Watchlist token:",
+ "prefs-watchlist-managetokens": "Manage tokens",
"prefs-misc": "Misc",
"prefs-resetpass": "Change password",
"prefs-changeemail": "Change or remove email address",
"recentchangesdays-max": "Maximum $1 {{PLURAL:$1|day|days}}",
"recentchangescount": "Number of edits to show by default:",
"prefs-help-recentchangescount": "This includes recent changes, page histories, and logs.",
- "prefs-help-watchlist-token2": "This is the secret key to the web feed of your watchlist.\nAnyone who knows it will be able to read your watchlist, so do not share it.\nIf you need to, [[Special:ResetTokens|you can reset it]].",
+ "prefs-help-tokenmanagement": "You can see and reset the secret key for your account that can access the Web feed of your watchlist. Anyone who knows the key will be able to read your watchlist, so do not share it.",
"savedprefs": "Your preferences have been saved.",
"savedrights": "The user groups of {{GENDER:$1|$1}} have been saved.",
"timezonelegend": "Time zone:",
"prefs-watchlist-edits": "Used in [[Special:Preferences]], tab \"Watchlist\".",
"prefs-watchlist-edits-max": "Shown as hint in [[Special:Preferences]], tab \"Watchlist\"",
"prefs-watchlist-token": "Used in [[Special:Preferences]], tab Watchlist.",
+ "prefs-watchlist-managetokens": "Label for the button to see and reset the user's private tokens",
"prefs-misc": "Tab used on the [[Special:Preferences|user preferences]] special page.",
"prefs-resetpass": "Button on user data tab in user preferences. When you click the button you go to the special page [[Special:ResetPass]].\n\n{{Identical|Change password}}",
"prefs-changeemail": "Link on [[Special:Preferences]] to [[Special:ChangeEmail]]. [[Special:ChangeEmail]] also allows removing email address. \n\nSee also:\n* {{msg-mw|prefs-help-email-required|help}}\n* {{msg-mw|prefs-help-email|help}}\n* {{msg-mw|prefs-help-email-others|help}}\n* {{msg-mw|prefs-setemail|link title}}",
"recentchangesdays-max": "Shown as hint in [[Special:Preferences]], tab \"Recent changes\". Parameters:\n* $1 - number of days\nSee also:\n* {{msg-mw|Prefs-watchlist-days-max}}",
"recentchangescount": "Used in [[Special:Preferences]], tab \"Recent changes\".",
"prefs-help-recentchangescount": "Used in [[Special:Preferences]], tab \"Recent changes\".",
- "prefs-help-watchlist-token2": "Used in [[Special:Preferences]], tab Watchlist. (Formerly in {{msg-mw|prefs-help-watchlist-token}}.)",
+ "prefs-help-tokenmanagement": "Used in [[Special:Preferences]], Watchlist tab.",
"savedprefs": "This message appears after saving changes to your user preferences.",
"savedrights": "This message appears after saving the user groups on [[Special:UserRights]].\n* $1 - The user name of the user which groups was saved.",
"timezonelegend": "{{Identical|Time zone}}",