Skip to content

Commit 70e9800

Browse files
committed
Add a confirmation prompt before logging out the user.
1 parent b6f5c9d commit 70e9800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

views/setup_page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<td><h3><?php esc_html_e( 'Logged in as', 'mailchimp' ); ?>: <?php echo esc_html( $user['username'] ); ?></h3>
2222
</td>
2323
<td>
24-
<form method="post" action="">
24+
<form method="post" action="" onsubmit="return confirm('<?php echo esc_js( __( 'Are you sure you want to log out?', 'mailchimp' ) ); ?>');">
2525
<input type="hidden" name="mcsf_action" value="logout"/>
2626
<input type="submit" name="Submit" value="<?php esc_attr_e( 'Logout', 'mailchimp' ); ?>" class="button button-secondary mailchimp-sf-button small" />
2727
<?php wp_nonce_field( 'mc_logout', '_mcsf_nonce_action' ); ?>

0 commit comments

Comments
 (0)