diff --git a/wp-admin/js/privacy-tools.js b/wp-admin/js/privacy-tools.js index bf8d49f221..802ec88f4b 100644 --- a/wp-admin/js/privacy-tools.js +++ b/wp-admin/js/privacy-tools.js @@ -71,7 +71,13 @@ jQuery( document ).ready( function( $ ) { clearResultsAfterRow( $requestRow ); function onExportDoneSuccess( zipUrl ) { + var summaryMessage = strings.emailSent; + setActionState( $action, 'export-personal-data-success' ); + + appendResultsAfterRow( $requestRow, 'notice-success', summaryMessage, [] ); + $this.hide(); + if ( 'undefined' !== typeof zipUrl ) { window.location = zipUrl; } else if ( ! sendAsEmail ) { @@ -168,7 +174,8 @@ jQuery( document ).ready( function( $ ) { classes = 'notice-warning'; } } - appendResultsAfterRow( $requestRow, 'notice-success', summaryMessage, messages ); + appendResultsAfterRow( $requestRow, classes, summaryMessage, messages ); + $this.hide(); } function onErasureFailure() { diff --git a/wp-admin/js/privacy-tools.min.js b/wp-admin/js/privacy-tools.min.js index a36a1d8d5f..5d1e65889f 100644 --- a/wp-admin/js/privacy-tools.min.js +++ b/wp-admin/js/privacy-tools.min.js @@ -1 +1 @@ -jQuery(document).ready(function(v){var f=window.privacyToolsL10n||{};function h(e,t){e.children().addClass("hidden"),e.children("."+t).removeClass("hidden")}function g(e){e.removeClass("has-request-results"),e.next().hasClass("request-results")&&e.next().remove()}function x(e,t,a,o){var n="",s="request-results";g(e),o.length&&(v.each(o,function(e,t){n=n+"
  • "+t+"
  • "}),n=""),e.addClass("has-request-results"),e.hasClass("status-request-confirmed")&&(s+=" status-request-confirmed"),e.hasClass("status-request-failed")&&(s+=" status-request-failed"),e.after(function(){return'

    '+a+"

    "+n+"
    "})}v(".export-personal-data-handle").click(function(e){var t=v(this),s=t.parents(".export-personal-data"),a=t.parents("tr"),r=s.data("request-id"),i=s.data("nonce"),d=s.data("exporters-count"),c=!!s.data("send-as-email");function l(e){h(s,"export-personal-data-failed"),e&&x(a,"notice-error",f.exportError,[e])}e.preventDefault(),e.stopPropagation(),s.blur(),g(a),h(s,"export-personal-data-processing"),function a(o,n){v.ajax({url:window.ajaxurl,data:{action:"wp-privacy-export-personal-data",exporter:o,id:r,page:n,security:i,sendAsEmail:c},method:"post"}).done(function(e){var t=e.data;e.success?t.done?o"+t+""}),o=""),e.addClass("has-request-results"),e.hasClass("status-request-confirmed")&&(s+=" status-request-confirmed"),e.hasClass("status-request-failed")&&(s+=" status-request-failed"),e.after(function(){return'

    '+a+"

    "+o+"
    "})}v(".export-personal-data-handle").click(function(e){var s=v(this),r=s.parents(".export-personal-data"),i=s.parents("tr"),t=r.data("request-id"),d=r.data("nonce"),c=r.data("exporters-count"),l=!!r.data("send-as-email");function u(e){h(r,"export-personal-data-failed"),e&&x(i,"notice-error",f.exportError,[e])}e.preventDefault(),e.stopPropagation(),r.blur(),g(i),h(r,"export-personal-data-processing"),function a(n,o){v.ajax({url:window.ajaxurl,data:{action:"wp-privacy-export-personal-data",exporter:n,id:t,page:o,security:d,sendAsEmail:l},method:"post"}).done(function(e){var t=e.data;e.success?t.done?n __( 'Personal data was found for this user but was not erased.' ), 'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ), 'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ), + 'emailSent' => __( 'The personal data export link for this user was sent.' ), 'noExportFile' => __( 'No personal data export file was generated.' ), 'exportError' => __( 'An error occurred while attempting to export personal data.' ), ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 714a423c00..e6a78946a9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-beta2-46411'; +$wp_version = '5.3-beta2-46412'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.