diff --git a/src/account-settings/AccountSettingsPage.jsx b/src/account-settings/AccountSettingsPage.jsx index 94c589821..1d1b813da 100644 --- a/src/account-settings/AccountSettingsPage.jsx +++ b/src/account-settings/AccountSettingsPage.jsx @@ -813,16 +813,11 @@ class AccountSettingsPage extends React.Component { {getConfig().ENABLE_ACCOUNT_DELETION && (
{intl.formatMessage(messages['account.settings.delete.account.subheader'])}
-- {intl.formatMessage( - messages['account.settings.delete.account.text.1'], - { siteName: getConfig().SITE_NAME }, - )} -
-- {intl.formatMessage( - messages[deleteAccountText2MessageKey], - { siteName: getConfig().SITE_NAME }, - )} -
-
-
- {intl.formatMessage( - messages['account.settings.delete.account.text.warning'], - { siteName: getConfig().SITE_NAME }, - )} -
-
-
- -
- - {isVerifiedAccount ? null : ( -{intl.formatMessage(messages['account.settings.delete.account.subheader'])}
++ {intl.formatMessage( + messages['account.settings.delete.account.text.1'], + { siteName: getConfig().SITE_NAME }, + )} +
++ {intl.formatMessage( + messages[deleteAccountText2MessageKey], + { siteName: getConfig().SITE_NAME }, + )} +
+
+
+ {intl.formatMessage( + messages['account.settings.delete.account.text.warning'], + { siteName: getConfig().SITE_NAME }, + )} +
+
+
+ +
+ {isVerifiedAccount ? null : ( +{intl.formatMessage(messages['account.settings.cannot.delete.account.text'])}
+ ) + } + ); } @@ -152,6 +159,7 @@ DeleteAccount.propTypes = { errorType: PropTypes.oneOf(['empty-password', 'server']), hasLinkedTPA: PropTypes.bool, isVerifiedAccount: PropTypes.bool, + canDeleteAccount: PropTypes.bool, intl: intlShape.isRequired, }; @@ -160,6 +168,7 @@ DeleteAccount.defaultProps = { isVerifiedAccount: true, status: null, errorType: null, + canDeleteAccount: true, }; // Assume we're part of the accountSettings state. diff --git a/src/account-settings/delete-account/messages.js b/src/account-settings/delete-account/messages.js index 3654e2300..8f10f2845 100644 --- a/src/account-settings/delete-account/messages.js +++ b/src/account-settings/delete-account/messages.js @@ -1,6 +1,11 @@ import { defineMessages } from '@edx/frontend-platform/i18n'; const messages = defineMessages({ + 'account.settings.cannot.delete.account.text': { + id: 'account.settings.cannot.delete.account.text', + defaultMessage: 'Please note that, for legal and regulatory compliance purposes, account deletion is currently unavailable.', + description: 'This text is visible when user is not allowed to delete account', + }, 'account.settings.delete.account.header': { id: 'account.settings.delete.account.header', defaultMessage: 'Delete My Account',