Ticket #52849: 52849.diff
File 52849.diff, 3.4 KB (added by , 4 years ago) |
---|
-
src/js/_enqueues/admin/application-passwords.js
150 150 } ); 151 151 } ); 152 152 153 $newAppPassField.on( 'keypress', function ( e ) { 154 if ( 13 === e.which ) { 155 e.preventDefault(); 156 $newAppPassButton.trigger( 'click' ); 157 } 158 } ); 159 153 160 // If there are no items, don't display the table yet. If there are, show it. 154 161 if ( 0 === $appPassTbody.children( 'tr' ).not( $appPassTrNoItems ).length ) { 155 162 $appPassTwrapper.hide(); -
src/wp-admin/includes/class-wp-application-passwords-list-table.php
110 110 * @param array $item The current application password item. 111 111 */ 112 112 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' ) 122 120 ); 123 121 } 124 122 … … 156 154 <div class="tablenav <?php echo esc_attr( $which ); ?>"> 157 155 <?php if ( 'bottom' === $which ) : ?> 158 156 <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> 160 158 </div> 161 159 <?php endif; ?> 162 160 <div class="alignleft actions bulkactions"> … … 235 233 break; 236 234 case 'revoke': 237 235 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>', 240 237 /* 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' ) 242 240 ); 243 241 break; 244 242 default: -
src/wp-admin/user-edit.php
780 780 do_action( 'wp_create_application_password_form', $profileuser ); 781 781 ?> 782 782 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> 784 784 </div> 785 785 <?php } else { ?> 786 786 <div class="notice notice-error inline">