From f4ca8bdf484ab2b57a9b6ad8c8f71426ffe89ccc Mon Sep 17 00:00:00 2001 From: Luis Moreno Date: Mon, 21 Oct 2019 19:01:23 -0400 Subject: [PATCH] Addressing feedback --- .../StudentAccountDeletionInitializer.js | 5 +++-- .../components/StudentAccountDeletion.jsx | 20 +++++++++++++++---- .../StudentAccountDeletionModal.jsx | 17 +++++++++++++--- .../student_account/account_settings.html | 4 +++- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/lms/static/js/student_account/StudentAccountDeletionInitializer.js b/lms/static/js/student_account/StudentAccountDeletionInitializer.js index 90c3868b7a..f062264d16 100644 --- a/lms/static/js/student_account/StudentAccountDeletionInitializer.js +++ b/lms/static/js/student_account/StudentAccountDeletionInitializer.js @@ -19,9 +19,10 @@ const wrapperRendered = setInterval(() => { props: { socialAccountLinks: window.auth, isActive: window.isActive, + additionalSiteSpecificDeletionText: window.additionalSiteSpecificDeletionText, + mktgRootLink: window.mktgRootLink, platformName: window.platformName, - siteName: window.siteName, - mktgRootLink: window.mktgRootLink + siteName: window.siteName }, }); } diff --git a/lms/static/js/student_account/components/StudentAccountDeletion.jsx b/lms/static/js/student_account/components/StudentAccountDeletion.jsx index 131b7689ef..a1de201549 100644 --- a/lms/static/js/student_account/components/StudentAccountDeletion.jsx +++ b/lms/static/js/student_account/components/StudentAccountDeletion.jsx @@ -96,13 +96,22 @@ export class StudentAccountDeletion extends React.Component { }, ); + const bodyDeletion2 = StringUtils.interpolate( + gettext('This includes access to {siteName} from your employer’s or university’s system and access to private sites offered by {additionalSiteSpecificDeletionText}.'), + { + siteName: this.props.siteName, + additionalSiteSpecificDeletionText: this.props.additionalSiteSpecificDeletionText, + }, + ); + + return (

{ gettext('We’re sorry to see you go!') }

{noteDeletion}

{bodyDeletion} - { gettext('This includes access to edx.org from your employer’s or university’s system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.') } + {bodyDeletion2}

}

); @@ -160,13 +170,15 @@ StudentAccountDeletion.propTypes = { socialAccountLinks: PropTypes.shape({ providers: PropTypes.arrayOf(PropTypes.object), }).isRequired, + additionalSiteSpecificDeletionText: PropTypes.string, + mktgRootLink: PropTypes.string, platformName: PropTypes.string, siteName: PropTypes.string, - mktgRootLink: PropTypes.string, }; StudentAccountDeletion.defaultProps = { + additionalSiteSpecificDeletionText: '', + mktgRootLink: '', platformName: '', siteName: '', - mktgRootLink: '', }; diff --git a/lms/static/js/student_account/components/StudentAccountDeletionModal.jsx b/lms/static/js/student_account/components/StudentAccountDeletionModal.jsx index 5238d53e76..b1dec8404b 100644 --- a/lms/static/js/student_account/components/StudentAccountDeletionModal.jsx +++ b/lms/static/js/student_account/components/StudentAccountDeletionModal.jsx @@ -116,6 +116,15 @@ class StudentAccountDeletionConfirmationModal extends React.Component { }, ); + const bodyDeletion2 = StringUtils.interpolate( + gettext('This includes access to {siteName} from your employer’s or university’s system and access to private sites offered by {additionalSiteSpecificDeletionText}.'), + { + siteName: this.props.siteName, + additionalSiteSpecificDeletionText: this.props.additionalSiteSpecificDeletionText, + }, + ); + + return (
{noteDeletion}

{bodyDeletion} - { gettext('This includes access to edx.org from your employer’s or university’s system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.') } + {bodyDeletion2}

@@ -216,16 +225,18 @@ class StudentAccountDeletionConfirmationModal extends React.Component { StudentAccountDeletionConfirmationModal.propTypes = { onClose: PropTypes.func, + additionalSiteSpecificDeletionText: PropTypes.string, + mktgRootLink: PropTypes.string, platformName: PropTypes.string, siteName: PropTypes.string, - mktgRootLink: PropTypes.string, }; StudentAccountDeletionConfirmationModal.defaultProps = { onClose: () => {}, + additionalSiteSpecificDeletionText: "", + mktgRootLink: "", platformName: "", siteName: "", - mktgRootLink: "", }; export default StudentAccountDeletionConfirmationModal; diff --git a/lms/templates/student_account/account_settings.html b/lms/templates/student_account/account_settings.html index 326fca4eef..bdf360704f 100644 --- a/lms/templates/student_account/account_settings.html +++ b/lms/templates/student_account/account_settings.html @@ -77,9 +77,11 @@ from openedx.core.djangoapps.user_api.accounts.utils import is_secondary_email_f <%static:webpack entry="StudentAccountDeletionInitializer">