Make WordPress Core

Ticket #52849: 52849.diff

File 52849.diff, 3.4 KB (added by sabernhardt, 4 years ago)
  • src/js/_enqueues/admin/application-passwords.js

     
    150150                } );
    151151        } );
    152152
     153        $newAppPassField.on( 'keypress', function ( e ) {
     154                if ( 13 === e.which ) {
     155                        e.preventDefault();
     156                        $newAppPassButton.trigger( 'click' );
     157                }
     158        } );
     159
    153160        // If there are no items, don't display the table yet.  If there are, show it.
    154161        if ( 0 === $appPassTbody.children( 'tr' ).not( $appPassTrNoItems ).length ) {
    155162                $appPassTwrapper.hide();
  • src/wp-admin/includes/class-wp-application-passwords-list-table.php

     
    110110         * @param array $item The current application password item.
    111111         */
    112112        public function column_revoke( $item ) {
    113                 submit_button(
    114                         __( 'Revoke' ),
    115                         'delete',
    116                         'revoke-application-password-' . $item['uuid'],
    117                         false,
    118                         array(
    119                                 /* translators: %s: the application password's given name. */
    120                                 'aria-label' => sprintf( __( 'Revoke "%s"' ), $item['name'] ),
    121                         )
     113                $name = 'revoke-application-password-' . $item['uuid'];
     114                printf(
     115                        '<button type="button" name="%1$s" id="%1$s" class="button delete" aria-label="%2$s">%3$s</button>',
     116                        esc_attr( $name ),
     117                        /* translators: %s: the application password's given name. */
     118                        esc_attr( sprintf( __( 'Revoke "%s"' ), $item['name'] ) ),
     119                        __( 'Revoke' )
    122120                );
    123121        }
    124122
     
    156154                <div class="tablenav <?php echo esc_attr( $which ); ?>">
    157155                        <?php if ( 'bottom' === $which ) : ?>
    158156                                <div class="alignright">
    159                                         <?php submit_button( __( 'Revoke all application passwords' ), 'delete', 'revoke-all-application-passwords', false ); ?>
     157                                        <button type="button" name="revoke-all-application-passwords" id="revoke-all-application-passwords" class="button delete"><?php _e( 'Revoke all application passwords' ); ?></button>
    160158                                </div>
    161159                        <?php endif; ?>
    162160                        <div class="alignleft actions bulkactions">
     
    235233                                        break;
    236234                                case 'revoke':
    237235                                        printf(
    238                                                 '<input type="submit" class="button delete" value="%1$s" aria-label="%2$s">',
    239                                                 esc_attr__( 'Revoke' ),
     236                                                '<button type="button" class="button delete" aria-label="%1$s">%2$s</button>',
    240237                                                /* translators: %s: the application password's given name. */
    241                                                 esc_attr( sprintf( __( 'Revoke "%s"' ), '{{ data.name }}' ) )
     238                                                esc_attr( sprintf( __( 'Revoke "%s"' ), '{{ data.name }}' ) ),
     239                                                esc_html__( 'Revoke' )
    242240                                        );
    243241                                        break;
    244242                                default:
  • src/wp-admin/user-edit.php

     
    780780                                do_action( 'wp_create_application_password_form', $profileuser );
    781781                                ?>
    782782
    783                                 <?php submit_button( __( 'Add New Application Password' ), 'secondary', 'do_new_application_password' ); ?>
     783                                <button type="button" name="do_new_application_password" id="do_new_application_password" class="button button-secondary"><?php _e( 'Add New Application Password' ); ?></button>
    784784                        </div>
    785785                <?php } else { ?>
    786786                        <div class="notice notice-error inline">