WordPress.org

Make WordPress Core

Changeset 31076


Ignore:
Timestamp:
01/08/2015 04:41:29 AM (5 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.

merges [31010] to the 4.1 branch

props ocean90

fixes #30871

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-admin/user-edit.php

    r30940 r31076  
    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.