From aca4ea439eafd9eb78c28af8bec96b32f188c603 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 1 May 2018 13:51:20 +0100 Subject: [PATCH] Make password reset & reset token buttons destructive Change-Id: I068d5bf7a8882348866c9beae7d109c28ea17b4e --- includes/specials/SpecialPasswordReset.php | 2 ++ includes/specials/SpecialResetTokens.php | 1 + 2 files changed, 3 insertions(+) diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 84292f3ed9..753923597b 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -105,6 +105,8 @@ class SpecialPasswordReset extends FormSpecialPage { public function alterForm( HTMLForm $form ) { $resetRoutes = $this->getConfig()->get( 'PasswordResetRoutes' ); + $form->setSubmitDestructive(); + $form->addHiddenFields( $this->getRequest()->getValues( 'returnto', 'returntoquery' ) ); $i = 0; diff --git a/includes/specials/SpecialResetTokens.php b/includes/specials/SpecialResetTokens.php index 964a261a6b..d5b0903588 100644 --- a/includes/specials/SpecialResetTokens.php +++ b/includes/specials/SpecialResetTokens.php @@ -121,6 +121,7 @@ class SpecialResetTokens extends FormSpecialPage { * @param HTMLForm $form */ protected function alterForm( HTMLForm $form ) { + $form->setSubmitDestructive(); if ( $this->getTokensList() ) { $form->setSubmitTextMsg( 'resettokens-resetbutton' ); } else { -- 2.20.1