New LOGIN_ISSUE_SUPPORT_LINK setting

The login page had a hard-coded support.edx.org URL.  This changes it to
a configurable setting. BTR-32.
This commit is contained in:
Ned Batchelder
2020-12-03 17:41:06 -05:00
parent 0e6d08cb6c
commit 761306114d
11 changed files with 22 additions and 8 deletions

View File

@@ -1533,6 +1533,7 @@ SUPPORT_SITE_LINK = ''
ID_VERIFICATION_SUPPORT_LINK = ''
PASSWORD_RESET_SUPPORT_LINK = ''
ACTIVATION_EMAIL_SUPPORT_LINK = ''
LOGIN_ISSUE_SUPPORT_LINK = ''
############################## EVENT TRACKING #################################

View File

@@ -33,6 +33,7 @@ from lms.envs.test import ( # pylint: disable=wrong-import-order
ECOMMERCE_API_URL,
ENABLE_COMPREHENSIVE_THEMING,
JWT_AUTH,
LOGIN_ISSUE_SUPPORT_LINK,
MEDIA_ROOT,
MEDIA_URL,
PLATFORM_DESCRIPTION,

View File

@@ -2805,6 +2805,7 @@ SUPPORT_SITE_LINK = ''
ID_VERIFICATION_SUPPORT_LINK = ''
PASSWORD_RESET_SUPPORT_LINK = ''
ACTIVATION_EMAIL_SUPPORT_LINK = ''
LOGIN_ISSUE_SUPPORT_LINK = ''
# Days before the expired date that we warn the user
ENTITLEMENT_EXPIRED_ALERT_PERIOD = 90

View File

@@ -308,9 +308,8 @@ MKTG_URL_OVERRIDES.update(ENV_TOKENS.get('MKTG_URL_OVERRIDES', MKTG_URL_OVERRIDE
# Intentional defaults.
ID_VERIFICATION_SUPPORT_LINK = ENV_TOKENS.get('ID_VERIFICATION_SUPPORT_LINK', SUPPORT_SITE_LINK)
PASSWORD_RESET_SUPPORT_LINK = ENV_TOKENS.get('PASSWORD_RESET_SUPPORT_LINK', SUPPORT_SITE_LINK)
ACTIVATION_EMAIL_SUPPORT_LINK = ENV_TOKENS.get(
'ACTIVATION_EMAIL_SUPPORT_LINK', SUPPORT_SITE_LINK
)
ACTIVATION_EMAIL_SUPPORT_LINK = ENV_TOKENS.get('ACTIVATION_EMAIL_SUPPORT_LINK', SUPPORT_SITE_LINK)
LOGIN_ISSUE_SUPPORT_LINK = ENV_TOKENS.get('LOGIN_ISSUE_SUPPORT_LINK', SUPPORT_SITE_LINK)
# Timezone overrides
TIME_ZONE = ENV_TOKENS.get('CELERY_TIMEZONE', CELERY_TIMEZONE)

View File

@@ -311,6 +311,7 @@ MKTG_URL_LINK_MAP = {
SUPPORT_SITE_LINK = 'https://example.support.edx.org'
PASSWORD_RESET_SUPPORT_LINK = 'https://support.example.com/password-reset-help.html'
ACTIVATION_EMAIL_SUPPORT_LINK = 'https://support.example.com/activation-email-help.html'
LOGIN_ISSUE_SUPPORT_LINK = 'https://support.example.com/login-issue-help.html'
ENTERPRISE_MARKETING_FOOTER_QUERY_PARAMS = OrderedDict([
("utm_campaign", "edX.org Referral"),
("utm_source", "edX.org"),

View File

@@ -94,7 +94,8 @@
requiredStr: this.requiredStr,
optionalStr: this.optionalStr,
supplementalText: data[i].supplementalText || '',
supplementalLink: data[i].supplementalLink || ''
supplementalLink: data[i].supplementalLink || '',
loginIssueSupportLink: data[i].loginIssueSupportLink || ''
})));
}

View File

@@ -136,7 +136,9 @@
<button type="button" class="login-help field-link"><i class="fa fa-caret-right" /><%- gettext("Need help signing in?") %></button>
<div id="login-help" style="display:none">
<button type="button" class="field-link form-toggle" data-type="password-reset"><%- gettext("Forgot my password") %></button>
<span><a class="field-link" href="https://support.edx.org/hc/en-us/sections/115004153367-Solve-a-Sign-in-Problem"><%- gettext("Other sign-in issues") %></a></span>
<% if ( loginIssueSupportLink ) { %>
<span><a class="field-link" href="<%- loginIssueSupportLink %>"><%- gettext("Other sign-in issues") %></a></span>
<% } %>
</div>
<button type="button" class="enterprise-login field-link"><%- gettext("Sign in with your company or school") %></button>
<% } %>
@@ -144,7 +146,9 @@
<button type="button" class="reset-help field-link" ><i class="fa fa-caret-right" /><%- gettext("Need other help signing in?") %></button>
<div id="reset-help" style="display:none">
<button type="button" class="field-link form-toggle" data-type="register"><%- gettext("Create an account") %></button>
<span><a class="field-link" href="https://support.edx.org/hc/en-us/sections/115004153367-Solve-a-Sign-in-Problem"><%- gettext("Other sign-in issues") %></a></span>
<% if ( loginIssueSupportLink ) { %>
<span><a class="field-link" href="<%- loginIssueSupportLink %>"><%- gettext("Other sign-in issues") %></a></span>
<% } %>
</div>
<% } %>
</div>

View File

@@ -12,6 +12,7 @@ from functools import wraps
import six
from django import forms
from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from django.utils.encoding import force_text
from django.utils.functional import Promise
@@ -206,7 +207,8 @@ class FormDescription(object):
"restrictions": {},
"errorMessages": {},
"supplementalLink": supplementalLink,
"supplementalText": supplementalText
"supplementalText": supplementalText,
"loginIssueSupportLink": settings.LOGIN_ISSUE_SUPPORT_LINK,
}
field_override = self._field_overrides.get(name, {})

View File

@@ -128,7 +128,8 @@ class FormDescriptionTest(TestCase):
"required": "You must provide a value!"
},
"supplementalLink": "",
"supplementalText": ""
"supplementalText": "",
"loginIssueSupportLink": "https://support.example.com/login-issue-help.html",
}
]
}))

View File

@@ -847,6 +847,7 @@ class LoginSessionViewTest(ApiTestCase):
"errorMessages": {},
"supplementalText": "",
"supplementalLink": "",
"loginIssueSupportLink": "https://support.example.com/login-issue-help.html",
},
{
"name": "password",
@@ -862,6 +863,7 @@ class LoginSessionViewTest(ApiTestCase):
"errorMessages": {},
"supplementalText": "",
"supplementalLink": "",
"loginIssueSupportLink": "https://support.example.com/login-issue-help.html",
},
])

View File

@@ -672,6 +672,7 @@ class PasswordResetViewTest(UserAPITestCase):
"errorMessages": {},
"supplementalText": "",
"supplementalLink": "",
"loginIssueSupportLink": "https://support.example.com/login-issue-help.html",
}
])