WordPress.org

Make WordPress Core

Changeset 45490


Ignore:
Timestamp:
06/04/2019 11:39:31 PM (6 months ago)
Author:
desrosj
Message:

Privacy: Remove inline CSS within personal data request list tables.

The .hidden class can be used to show and hide UI elements instead.

Props birgire, pratikthink, garrett-eclipse.
Fixes #44839.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/privacy-tools.js

    r45448 r45490  
    1010
    1111    function setActionState( $action, state ) {
    12         $action.children().hide();
    13         $action.children( '.' + state ).show();
     12        $action.children().addClass( 'hidden' );
     13        $action.children( '.' + state ).removeClass( 'hidden' );
    1414    }
    1515
  • trunk/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php

    r45448 r45490  
    5858
    5959        $download_data_markup .= '<span class="export-personal-data-idle"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data' ) . '</button></span>' .
    60             '<span style="display:none" class="export-personal-data-processing" >' . __( 'Downloading Data...' ) . '</span>' .
    61             '<span style="display:none" class="export-personal-data-success"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data Again' ) . '</button></span>' .
    62             '<span style="display:none" class="export-personal-data-failed">' . __( 'Download failed.' ) . ' <button type="button" class="button-link">' . __( 'Retry' ) . '</button></span>';
     60            '<span class="export-personal-data-processing hidden">' . __( 'Downloading Data...' ) . '</span>' .
     61            '<span class="export-personal-data-success hidden"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data Again' ) . '</button></span>' .
     62            '<span class="export-personal-data-failed hidden">' . __( 'Download failed.' ) . ' <button type="button" class="button-link">' . __( 'Retry' ) . '</button></span>';
    6363
    6464        $download_data_markup .= '</div>';
     
    101101                ?>
    102102                <span class="export-personal-data-idle"><button type="button" class="button export-personal-data-handle"><?php _e( 'Send Export Link' ); ?></button></span>
    103                 <span style="display:none" class="export-personal-data-processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span>
    104                 <span style="display:none" class="export-personal-data-success success-message" ><?php _e( 'Email sent.' ); ?></span>
    105                 <span style="display:none" class="export-personal-data-failed"><?php _e( 'Email could not be sent.' ); ?> <button type="button" class="button export-personal-data-handle"><?php _e( 'Retry' ); ?></button></span>
     103                <span class="export-personal-data-processing button updating-message hidden"><?php _e( 'Sending Email...' ); ?></span>
     104                <span class="export-personal-data-success success-message hidden"><?php _e( 'Email sent.' ); ?></span>
     105                <span class="export-personal-data-failed hidden"><?php _e( 'Email could not be sent.' ); ?> <button type="button" class="button export-personal-data-handle"><?php _e( 'Retry' ); ?></button></span>
    106106                <?php
    107107
  • trunk/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php

    r45448 r45490  
    6363
    6464            $remove_data_markup .= '<span class="remove-personal-data-idle"><button type="button" class="button-link remove-personal-data-handle">' . __( 'Force Erase Personal Data' ) . '</button></span>' .
    65                 '<span style="display:none" class="remove-personal-data-processing" >' . __( 'Erasing Data...' ) . '</span>' .
    66                 '<span style="display:none" class="remove-personal-data-failed">' . __( 'Force Erase has failed.' ) . ' <button type="button" class="button-link remove-personal-data-handle">' . __( 'Retry' ) . '</button></span>';
     65                '<span class="remove-personal-data-processing hidden">' . __( 'Erasing Data...' ) . '</span>' .
     66                '<span class="remove-personal-data-failed hidden">' . __( 'Force Erase has failed.' ) . ' <button type="button" class="button-link remove-personal-data-handle">' . __( 'Retry' ) . '</button></span>';
    6767
    6868            $remove_data_markup .= '</div>';
     
    106106                ?>
    107107                <span class="remove-personal-data-idle"><button type="button" class="button remove-personal-data-handle"><?php _e( 'Erase Personal Data' ); ?></button></span>
    108                 <span style="display:none" class="remove-personal-data-processing button updating-message" ><?php _e( 'Erasing Data...' ); ?></span>
    109                 <span style="display:none" class="remove-personal-data-failed"><?php _e( 'Erasing Data has failed.' ); ?> <button type="button" class="button remove-personal-data-handle"><?php _e( 'Retry' ); ?></button></span>
     108                <span class="remove-personal-data-processing button updating-message hidden"><?php _e( 'Erasing Data...' ); ?></span>
     109                <span class="remove-personal-data-failed hidden"><?php _e( 'Erasing Data has failed.' ); ?> <button type="button" class="button remove-personal-data-handle"><?php _e( 'Retry' ); ?></button></span>
    110110                <?php
    111111
Note: See TracChangeset for help on using the changeset viewer.