Make password reset & reset token buttons destructive
authorEd Sanders <esanders@wikimedia.org>
Tue, 1 May 2018 12:51:20 +0000 (13:51 +0100)
committerEd Sanders <esanders@wikimedia.org>
Tue, 1 May 2018 12:55:26 +0000 (13:55 +0100)
Change-Id: I068d5bf7a8882348866c9beae7d109c28ea17b4e

includes/specials/SpecialPasswordReset.php
includes/specials/SpecialResetTokens.php

index 84292f3..7539235 100644 (file)
@@ -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;
index 964a261..d5b0903 100644 (file)
@@ -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 {