diff --git a/.env.development b/.env.development index 2feb7f77..98e396ab 100644 --- a/.env.development +++ b/.env.development @@ -30,3 +30,4 @@ WELCOME_PAGE_SUPPORT_LINK='http://localhost:1999/welcome' INFO_EMAIL='info@edx.org' DISABLE_ENTERPRISE_LOGIN='' REGISTER_CONVERSION_COOKIE_NAME='openedx-user-register-conversion' +COLLECT_YEAR_OF_BIRTH='true' diff --git a/src/welcome/WelcomePage.jsx b/src/welcome/WelcomePage.jsx index 9ec7ff3a..f8218c46 100644 --- a/src/welcome/WelcomePage.jsx +++ b/src/welcome/WelcomePage.jsx @@ -170,19 +170,22 @@ const WelcomePage = (props) => { {getOptions('levelOfEducation')} - - onChangeHandler(e)} - trailingElement={} - floatingLabel={intl.formatMessage(messages['year.of.birth.label'])} - > - - {getOptions('yearOfBirth')} - - + {(getConfig().COLLECT_YEAR_OF_BIRTH === 'true') + && ( + + onChangeHandler(e)} + trailingElement={} + floatingLabel={intl.formatMessage(messages['year.of.birth.label'])} + > + + {getOptions('yearOfBirth')} + + + )} { level_of_education: 'other', gender: 'm', }; - + mergeConfig({ + COLLECT_YEAR_OF_BIRTH: 'true', + }); store.dispatch = jest.fn(store.dispatch); const welcomePage = await getWelcomePage();