Make WordPress Core


Ignore:
Timestamp:
12/31/2014 05:32:39 PM (10 years ago)
Author:
jorbin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-edit.php

    r30888 r31010  
    490490        <th>&nbsp;</th>
    491491        <td aria-live="assertive">
    492             <div class="destroy-sessions"><button disabled class="button button-secondary"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
     492            <div class="destroy-sessions"><button type="button" disabled class="button button-secondary"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
    493493            <p class="description">
    494494                <?php _e( 'You are only logged in at this location.' ); ?>
     
    500500        <th>&nbsp;</th>
    501501        <td aria-live="assertive">
    502             <div class="destroy-sessions"><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
     502            <div class="destroy-sessions"><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
    503503            <p class="description">
    504504                <?php _e( 'Left your account logged in at a public computer? Lost your phone? This will log you out everywhere except your current browser.' ); ?>
     
    510510        <th>&nbsp;</th>
    511511        <td>
    512             <p><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
     512            <p><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
    513513            <p class="description">
    514514                <?php
Note: See TracChangeset for help on using the changeset viewer.