diff --git a/common/djangoapps/student/message_types.py b/common/djangoapps/student/message_types.py
index 95f63a3da7..a16c0cd849 100644
--- a/common/djangoapps/student/message_types.py
+++ b/common/djangoapps/student/message_types.py
@@ -24,3 +24,10 @@ class EmailChange(BaseMessageType):
super(EmailChange, self).__init__(*args, **kwargs)
self.options['transactional'] = True
+
+
+class RecoveryEmailCreate(BaseMessageType):
+ def __init__(self, *args, **kwargs):
+ super(RecoveryEmailCreate, self).__init__(*args, **kwargs)
+
+ self.options['transactional'] = True
diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py
index 002293c912..74d7dc57ca 100644
--- a/common/djangoapps/student/tests/test_email.py
+++ b/common/djangoapps/student/tests/test_email.py
@@ -653,18 +653,15 @@ class SecondaryEmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, Ca
self.do_secondary_email_change(self.user, new_email, registration_key)
self._assert_email(
- subject=u'Request to change édX account secondary e-mail',
+ subject=u'Confirm your recovery email for édX',
body_fragments=[
- u'We received a request to change the secondary e-mail associated with',
- u'your édX account to {new_email}.'.format(
+ u'You\'ve registered this recovery email address for édX.'.format(
new_email=new_email,
),
- u'If this is correct, please confirm your new secondary e-mail address by visiting:',
+ u'If you set this email address, click "confirm email."',
+ u'If you didn\'t request this change, you can disregard this email.',
u'http://edx.org/activate_secondary_email/{key}'.format(key=registration_key),
- u'If you didn\'t request this, you don\'t need to do anything;',
- u'you won\'t receive any more email from us.',
- u'Please do not reply to this e-mail; if you require assistance,',
- u'check the help section of the édX web site.',
+
],
)
diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py
index 5a30d3bf84..cfe1e84922 100644
--- a/common/djangoapps/student/views/management.py
+++ b/common/djangoapps/student/views/management.py
@@ -72,7 +72,7 @@ from student.helpers import (
cert_info,
generate_activation_email_context,
)
-from student.message_types import EmailChange, PasswordReset
+from student.message_types import EmailChange, PasswordReset, RecoveryEmailCreate
from student.models import (
AccountRecovery,
CourseEnrollment,
@@ -1034,7 +1034,6 @@ def do_email_change_request(user, new_email, activation_key=None, secondary_emai
message_context.update({
'old_email': user.email,
'new_email': new_email,
- 'is_secondary_email_change_request': secondary_email_change_request,
'confirm_link': '{protocol}://{site}{link}'.format(
protocol='https' if use_https else 'http',
site=configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME),
@@ -1042,11 +1041,18 @@ def do_email_change_request(user, new_email, activation_key=None, secondary_emai
),
})
- msg = EmailChange().personalize(
- recipient=Recipient(user.username, new_email),
- language=preferences_api.get_user_preference(user, LANGUAGE_KEY),
- user_context=message_context,
- )
+ if secondary_email_change_request:
+ msg = RecoveryEmailCreate().personalize(
+ recipient=Recipient(user.username, new_email),
+ language=preferences_api.get_user_preference(user, LANGUAGE_KEY),
+ user_context=message_context,
+ )
+ else:
+ msg = EmailChange().personalize(
+ recipient=Recipient(user.username, new_email),
+ language=preferences_api.get_user_preference(user, LANGUAGE_KEY),
+ user_context=message_context,
+ )
try:
ace.send(msg)
diff --git a/common/templates/student/edx_ace/accountrecovery/email/body.html b/common/templates/student/edx_ace/accountrecovery/email/body.html
index d696dac8ff..2d499de139 100644
--- a/common/templates/student/edx_ace/accountrecovery/email/body.html
+++ b/common/templates/student/edx_ace/accountrecovery/email/body.html
@@ -15,12 +15,12 @@
- {% trans "We've restored access to your edX account using the recovery email you provided at registration." %}
+ {% blocktrans %}We've restored access to your {{ platform_name }} account using the recovery email you provided at registration.{% endblocktrans %}
- {% blocktrans %}Once you've created a password [below], you will be able to log in to edX with this email ({{ email }}) and your new password.{% endblocktrans %}
+ {% blocktrans %}Once you've created a password [below], you will be able to log in to {{ platform_name }} with this email ({{ email }}) and your new password.{% endblocktrans %}
diff --git a/common/templates/student/edx_ace/accountrecovery/email/body.txt b/common/templates/student/edx_ace/accountrecovery/email/body.txt
index 7d53f3da6d..a84e7209d8 100644
--- a/common/templates/student/edx_ace/accountrecovery/email/body.txt
+++ b/common/templates/student/edx_ace/accountrecovery/email/body.txt
@@ -1,9 +1,9 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this e-mail because you requested to create a password for your user account at {{ platform_name }}.{% endblocktrans %}
-{% trans "We've restored access to your edX account using the recovery email you provided at registration." %}
+{% blocktrans %}We've restored access to your {{ platform_name }} account using the recovery email you provided at registration.{% endblocktrans %}
-{% blocktrans %}Once you've created a password [below], you will be able to log in to edX with this email ({{ email }}) and your new password.{% endblocktrans %}
+{% blocktrans %}Once you've created a password [below], you will be able to log in to {{ platform_name }} with this email ({{ email }}) and your new password.{% endblocktrans %}
{% trans "If you didn't request this change, you can disregard this email - we have not yet reset your password." %}
diff --git a/common/templates/student/edx_ace/emailchange/email/body.html b/common/templates/student/edx_ace/emailchange/email/body.html
index 8462c2fa7f..93cc842e14 100644
--- a/common/templates/student/edx_ace/emailchange/email/body.html
+++ b/common/templates/student/edx_ace/emailchange/email/body.html
@@ -10,11 +10,7 @@
{% trans "Email Change" %}
- {% if is_secondary_email_change_request %}
- {% blocktrans %}We received a request to change the secondary e-mail associated with your {{ platform_name }} account to {{ new_email }}. If this is correct, please confirm your new secondary e-mail address by visiting:{% endblocktrans %}
- {% else %}
- {% blocktrans %}We received a request to change the e-mail associated with your {{ platform_name }} account from {{ old_email }} to {{ new_email }}. If this is correct, please confirm your new e-mail address by visiting:{% endblocktrans %}
- {% endif %}
+ {% blocktrans %}We received a request to change the e-mail associated with your {{ platform_name }} account from {{ old_email }} to {{ new_email }}. If this is correct, please confirm your new e-mail address by visiting:{% endblocktrans %}
diff --git a/common/templates/student/edx_ace/emailchange/email/body.txt b/common/templates/student/edx_ace/emailchange/email/body.txt
index 1b9e381748..34c86d59bf 100644
--- a/common/templates/student/edx_ace/emailchange/email/body.txt
+++ b/common/templates/student/edx_ace/emailchange/email/body.txt
@@ -1,9 +1,5 @@
{% load i18n %}{% autoescape off %}
-{% if is_secondary_email_change_request %}
- {% blocktrans %}We received a request to change the secondary e-mail associated with your {{ platform_name }} account to {{ new_email }}. If this is correct, please confirm your new secondary e-mail address by visiting:{% endblocktrans %}
-{% else %}
- {% blocktrans %}We received a request to change the e-mail associated with your {{ platform_name }} account from {{ old_email }} to {{ new_email }}. If this is correct, please confirm your new e-mail address by visiting:{% endblocktrans %}
-{% endif %}
+{% blocktrans %}We received a request to change the e-mail associated with your {{ platform_name }} account from {{ old_email }} to {{ new_email }}. If this is correct, please confirm your new e-mail address by visiting:{% endblocktrans %}
{{ confirm_link }}
diff --git a/common/templates/student/edx_ace/emailchange/email/subject.txt b/common/templates/student/edx_ace/emailchange/email/subject.txt
index ea24a76f50..54313b5c8f 100644
--- a/common/templates/student/edx_ace/emailchange/email/subject.txt
+++ b/common/templates/student/edx_ace/emailchange/email/subject.txt
@@ -1,8 +1,4 @@
{% load i18n %}
{% autoescape off %}
-{% if is_secondary_email_change_request %}
- {% blocktrans trimmed %}Request to change {{ platform_name }} account secondary e-mail{% endblocktrans %}
-{% else %}
- {% blocktrans trimmed %}Request to change {{ platform_name }} account e-mail{% endblocktrans %}
-{% endif %}
+{% blocktrans trimmed %}Request to change {{ platform_name }} account e-mail{% endblocktrans %}
{% endautoescape %}
diff --git a/common/templates/student/edx_ace/recoveryemailcreate/email/body.html b/common/templates/student/edx_ace/recoveryemailcreate/email/body.html
new file mode 100644
index 0000000000..4f4d06b383
--- /dev/null
+++ b/common/templates/student/edx_ace/recoveryemailcreate/email/body.html
@@ -0,0 +1,25 @@
+{% extends 'ace_common/edx_ace/common/base_body.html' %}
+
+{% load i18n %}
+{% load static %}
+{% block content %}
+
+
+
+
+ {% trans "Create Recovery Email" %}
+
+
+ {% blocktrans %}You've registered this recovery email address for {{ platform_name }}.{% endblocktrans %}
+
+ {% blocktrans %}If you set this email address, click "confirm email." If you didn't request this change, you can disregard this email.{% endblocktrans %}
+
+
+
+ {% trans "Confirm Email" as course_cta_text %}
+ {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=confirm_link %}
+
+ |
+
+
+{% endblock %}
diff --git a/common/templates/student/edx_ace/recoveryemailcreate/email/body.txt b/common/templates/student/edx_ace/recoveryemailcreate/email/body.txt
new file mode 100644
index 0000000000..28a315a96e
--- /dev/null
+++ b/common/templates/student/edx_ace/recoveryemailcreate/email/body.txt
@@ -0,0 +1,8 @@
+{% load i18n %}{% autoescape off %}
+{% blocktrans %}You've registered this recovery email address for {{ platform_name }}.{% endblocktrans %}
+
+{% blocktrans %}If you set this email address, click "confirm email." If you didn't request this change, you can disregard this email.{% endblocktrans %}
+
+{{ confirm_link }}
+
+{% endautoescape %}
\ No newline at end of file
diff --git a/common/templates/student/edx_ace/recoveryemailcreate/email/from_name.txt b/common/templates/student/edx_ace/recoveryemailcreate/email/from_name.txt
new file mode 100644
index 0000000000..dcbc23c004
--- /dev/null
+++ b/common/templates/student/edx_ace/recoveryemailcreate/email/from_name.txt
@@ -0,0 +1 @@
+{{ platform_name }}
diff --git a/common/templates/student/edx_ace/recoveryemailcreate/email/head.html b/common/templates/student/edx_ace/recoveryemailcreate/email/head.html
new file mode 100644
index 0000000000..366ada7ad9
--- /dev/null
+++ b/common/templates/student/edx_ace/recoveryemailcreate/email/head.html
@@ -0,0 +1 @@
+{% extends 'ace_common/edx_ace/common/base_head.html' %}
diff --git a/common/templates/student/edx_ace/recoveryemailcreate/email/subject.txt b/common/templates/student/edx_ace/recoveryemailcreate/email/subject.txt
new file mode 100644
index 0000000000..ffd5b4e605
--- /dev/null
+++ b/common/templates/student/edx_ace/recoveryemailcreate/email/subject.txt
@@ -0,0 +1,4 @@
+{% load i18n %}
+{% autoescape off %}
+{% blocktrans trimmed %}Confirm your recovery email for {{ platform_name }} {% endblocktrans %}
+{% endautoescape %}
diff --git a/lms/static/js/student_account/views/account_settings_factory.js b/lms/static/js/student_account/views/account_settings_factory.js
index ae8319eaab..1d7b348924 100644
--- a/lms/static/js/student_account/views/account_settings_factory.js
+++ b/lms/static/js/student_account/views/account_settings_factory.js
@@ -90,7 +90,7 @@
model: userAccountModel,
title: gettext('Recovery Email Address'),
valueAttribute: 'secondary_email',
- helpMessage: gettext('You may access your account when single-sign on is not available.'),
+ helpMessage: gettext('You may access your account with this address if single-sign on or access to your primary email is not available.'), // eslint-disable-line max-len
persistChanges: true
};
diff --git a/lms/templates/student_account/password_reset.underscore b/lms/templates/student_account/password_reset.underscore
index bdfb2b4153..76b90dd56d 100644
--- a/lms/templates/student_account/password_reset.underscore
+++ b/lms/templates/student_account/password_reset.underscore
@@ -5,7 +5,7 @@