From c792b0ec65da3f228febcd1bae16d93d6d31a3d8 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Thu, 2 Mar 2023 09:26:32 +0200 Subject: [PATCH] feat: make password reset support URL configurable (#746) * feat: make password reset support URL configurable Replace the hardcoded `support.edx.org` value with the one from the env vars. * fix: linting error --- .env | 1 + .env.development | 1 + README.rst | 10 ++++++++++ .../reset-password/ConfirmationAlert.jsx | 3 ++- src/index.jsx | 1 + 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 3b40baf..90fa5d9 100644 --- a/.env +++ b/.env @@ -30,3 +30,4 @@ ENABLE_DOB_UPDATE='' MARKETING_EMAILS_OPT_IN='' APP_ID= MFE_CONFIG_API_URL= +PASSWORD_RESET_SUPPORT_LINK='' diff --git a/.env.development b/.env.development index 40e4c89..b2cb20c 100644 --- a/.env.development +++ b/.env.development @@ -31,4 +31,5 @@ ENABLE_DOB_UPDATE='' MARKETING_EMAILS_OPT_IN='' APP_ID= MFE_CONFIG_API_URL= +PASSWORD_RESET_SUPPORT_LINK='mailto:support@example.com' diff --git a/README.rst b/README.rst index 2394108..9041bab 100644 --- a/README.rst +++ b/README.rst @@ -55,6 +55,16 @@ Example: ``https://support.example.com`` The fully-qualified URL to the support page in the target environment. +``PASSWORD_RESET_SUPPORT_LINK`` + +Examples: + +- ``https://support.edx.org/hc/en-us/articles/206212088-What-if-I-did-not-receive-a-password-reset-message-`` + +- ``mailto:support@example.com`` + +The fully-qualified URL to the support page or email to request the support from in the target environment. + edX-specific Environment Variables ********************************** diff --git a/src/account-settings/reset-password/ConfirmationAlert.jsx b/src/account-settings/reset-password/ConfirmationAlert.jsx index c1f6b1a..58ab563 100644 --- a/src/account-settings/reset-password/ConfirmationAlert.jsx +++ b/src/account-settings/reset-password/ConfirmationAlert.jsx @@ -1,5 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { getConfig } from '@edx/frontend-platform'; import { FormattedMessage } from '@edx/frontend-platform/i18n'; import { Hyperlink } from '@edx/paragon'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; @@ -12,7 +13,7 @@ function ConfirmationAlert(props) { const technicalSupportLink = (