Privacy: Ensure that sending email, and remove data follow the same user experience.

Both personal data request processes should follow the same convention.

Fixes: #43974.
Props: garrett-eclipse, kjellr, Kerfred, birgire, marybaum, SergeyBiryukov.




git-svn-id: https://develop.svn.wordpress.org/trunk@46412 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2019-10-06 06:54:13 +00:00
parent de0efbb825
commit ed1a53588f
2 changed files with 9 additions and 1 deletions

View File

@ -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() {

View File

@ -1801,6 +1801,7 @@ function wp_default_scripts( &$scripts ) {
'noneRemoved' => __( '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.' ),
)