diff --git a/src/components/course/data/hooks.js b/src/components/course/data/hooks.js index a849ad1aa1..4c15fe9a31 100644 --- a/src/components/course/data/hooks.js +++ b/src/components/course/data/hooks.js @@ -280,6 +280,9 @@ const useCourseEnrollmentUrl = ({ license_uuid: subscriptionLicense.uuid, course_id: key, enterprise_customer_uuid: enterpriseConfig.uuid, + // We don't want any sidebar text we show the data consent page from this workflow since + // the text on the sidebar is used when a learner is coming from their employer's system. + left_sidebar_text_override: '', }; return `${config.LMS_BASE_URL}/enterprise/grant_data_sharing_permissions/?${qs.stringify(enrollOptions)}`; } @@ -288,9 +291,7 @@ const useCourseEnrollmentUrl = ({ const enrollOptions = { ...baseEnrollmentOptions, sku, - // We don't want any sidebar text we show the data consent page from this workflow: - left_sidebar_text_override: '', - + consent_url_param_string: encodeURI('left_sidebar_text_override='), // Deliberately doubly encoded since it will get parsed on the redirect. }; // get the index of the first offer that applies to a catalog that the course is in const offerForCourse = findOfferForCourse(offers, catalogList); diff --git a/src/components/course/enrollment/common.jsx b/src/components/course/enrollment/common.jsx index 5af8548eef..5b70f29272 100644 --- a/src/components/course/enrollment/common.jsx +++ b/src/components/course/enrollment/common.jsx @@ -33,6 +33,6 @@ const EnrollButtonCta = ({ enrollLabel: EnrollLabel, ...props }) => ( ); -EnrollButtonCta.propTypes = { enrollLabel: PropTypes.shape.isRequired }; +EnrollButtonCta.propTypes = { enrollLabel: PropTypes.node.isRequired }; export { EnrollButtonCta }; diff --git a/src/components/course/enrollment/components/DisabledEnroll.jsx b/src/components/course/enrollment/components/DisabledEnroll.jsx index 862d2b8a57..d88da1d3bd 100644 --- a/src/components/course/enrollment/components/DisabledEnroll.jsx +++ b/src/components/course/enrollment/components/DisabledEnroll.jsx @@ -12,7 +12,7 @@ const EnrollBtnDisabled = ({ enrollLabel }) => ( ); EnrollBtnDisabled.propTypes = { - enrollLabel: PropTypes.shape.isRequired, + enrollLabel: PropTypes.node.isRequired, }; export default EnrollBtnDisabled; diff --git a/src/components/course/enrollment/components/ToCoursewarePage.jsx b/src/components/course/enrollment/components/ToCoursewarePage.jsx index de5128647d..fa904ae99f 100644 --- a/src/components/course/enrollment/components/ToCoursewarePage.jsx +++ b/src/components/course/enrollment/components/ToCoursewarePage.jsx @@ -36,7 +36,7 @@ const ToCoursewarePage = ({ }; ToCoursewarePage.propTypes = { - enrollLabel: PropTypes.shape.isRequired, + enrollLabel: PropTypes.node.isRequired, enrollmentUrl: PropTypes.string.isRequired, userEnrollment: PropTypes.shape.isRequired, subscriptionLicense: PropTypes.shape.isRequired, diff --git a/src/components/course/enrollment/components/ToDataSharingConsent.jsx b/src/components/course/enrollment/components/ToDataSharingConsent.jsx index 5ac1947db9..caf01454dc 100644 --- a/src/components/course/enrollment/components/ToDataSharingConsent.jsx +++ b/src/components/course/enrollment/components/ToDataSharingConsent.jsx @@ -16,7 +16,7 @@ const ToDataSharingConsentPage = ({ enrollLabel, enrollmentUrl }) => ( ); ToDataSharingConsentPage.propTypes = { - enrollLabel: PropTypes.shape.isRequired, + enrollLabel: PropTypes.node.isRequired, enrollmentUrl: PropTypes.string.isRequired, }; diff --git a/src/components/course/enrollment/components/ToVoucherRedeemPage.jsx b/src/components/course/enrollment/components/ToVoucherRedeemPage.jsx index 9ac5ce3cc5..4030effb32 100644 --- a/src/components/course/enrollment/components/ToVoucherRedeemPage.jsx +++ b/src/components/course/enrollment/components/ToVoucherRedeemPage.jsx @@ -29,7 +29,7 @@ const ToVoucherRedeemPage = ({ enrollLabel, enrollmentUrl }) => { ); }; ToVoucherRedeemPage.propTypes = { - enrollLabel: PropTypes.shape.isRequired, + enrollLabel: PropTypes.node.isRequired, enrollmentUrl: PropTypes.string.isRequired, }; diff --git a/src/components/course/enrollment/components/ViewOnDashboard.jsx b/src/components/course/enrollment/components/ViewOnDashboard.jsx index 24990c5d1f..0db63738fd 100644 --- a/src/components/course/enrollment/components/ViewOnDashboard.jsx +++ b/src/components/course/enrollment/components/ViewOnDashboard.jsx @@ -22,7 +22,7 @@ const ViewOnDashboard = ({ enrollLabel }) => { }; ViewOnDashboard.propTypes = { - enrollLabel: PropTypes.shape.isRequired, + enrollLabel: PropTypes.node.isRequired, }; export default ViewOnDashboard; diff --git a/src/components/enterprise-user-subsidy/OffersAlert.jsx b/src/components/enterprise-user-subsidy/OffersAlert.jsx index 137d47c630..e4b2d23cf3 100644 --- a/src/components/enterprise-user-subsidy/OffersAlert.jsx +++ b/src/components/enterprise-user-subsidy/OffersAlert.jsx @@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; import { UserSubsidyContext } from '.'; -export const getOffersText = (number) => `You have ${number} enrollment codes${number > 1 ? 's' : ''} left to use.`; +export const getOffersText = (number) => `You have ${number} enrollment code${number > 1 ? 's' : ''} left to use.`; const OffersAlert = () => { const { offers } = useContext(UserSubsidyContext);