Set the type attribute of the buttons for logging out of all sessions to buttons
By not setting this attribute, the buttons default to submit and as the first submit button on the page, it causes pressing the enter key to log you out of all sessions. This change restores the pre 4.1 behavior where pressing enter while focused on a form field submits the form. props ocean90 fixes #30871 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@31010 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
be2ea9b9f9
commit
43edd17097
@ -489,7 +489,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
|
||||
<tr class="user-sessions-wrap hide-if-no-js">
|
||||
<th> </th>
|
||||
<td aria-live="assertive">
|
||||
<div class="destroy-sessions"><button disabled class="button button-secondary"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
|
||||
<div class="destroy-sessions"><button type="button" disabled class="button button-secondary"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
|
||||
<p class="description">
|
||||
<?php _e( 'You are only logged in at this location.' ); ?>
|
||||
</p>
|
||||
@ -499,7 +499,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
|
||||
<tr class="user-sessions-wrap hide-if-no-js">
|
||||
<th> </th>
|
||||
<td aria-live="assertive">
|
||||
<div class="destroy-sessions"><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
|
||||
<div class="destroy-sessions"><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
|
||||
<p class="description">
|
||||
<?php _e( 'Left your account logged in at a public computer? Lost your phone? This will log you out everywhere except your current browser.' ); ?>
|
||||
</p>
|
||||
@ -509,7 +509,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
|
||||
<tr class="user-sessions-wrap hide-if-no-js">
|
||||
<th> </th>
|
||||
<td>
|
||||
<p><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
|
||||
<p><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
|
||||
<p class="description">
|
||||
<?php
|
||||
/* translators: 1: User's display name. */
|
||||
|
Loading…
Reference in New Issue
Block a user