diff --git a/providers/class-two-factor-totp.php b/providers/class-two-factor-totp.php index 99786bd3..74f0f2e6 100644 --- a/providers/class-two-factor-totp.php +++ b/providers/class-two-factor-totp.php @@ -384,8 +384,10 @@ public function user_two_factor_options( $user ) { $error.find('p').text( errorMessage ); + $( '#enabled-Two_Factor_Totp' ).prop( 'checked', false ); $('#two-factor-totp-authcode').val(''); } ).then( function( response ) { + $( '#enabled-Two_Factor_Totp' ).prop( 'checked', true ); $( '#two-factor-totp-options' ).html( response.html ); } ); } ); @@ -412,6 +414,7 @@ public function user_two_factor_options( $user ) { user_id: ID ); ?>, } } ).then( function( response ) { + $( '#enabled-Two_Factor_Totp' ).prop( 'checked', false ); $( '#two-factor-totp-options' ).html( response.html ); } ); } );