feat: [VAN-751] Put user's year of birth behind the feature flag
This commit is contained in:
1
.env
1
.env
@@ -25,3 +25,4 @@ SITE_NAME=''
|
||||
STUDIO_BASE_URL=''
|
||||
SUPPORT_URL=''
|
||||
USER_INFO_COOKIE_NAME=''
|
||||
COLLECT_YEAR_OF_BIRTH='true'
|
||||
|
||||
@@ -26,3 +26,4 @@ SITE_NAME=localhost
|
||||
STUDIO_BASE_URL=''
|
||||
SUPPORT_URL='http://localhost:18000/support'
|
||||
USER_INFO_COOKIE_NAME='edx-user-info'
|
||||
COLLECT_YEAR_OF_BIRTH='true'
|
||||
|
||||
@@ -25,3 +25,4 @@ SITE_NAME=localhost
|
||||
STUDIO_BASE_URL=''
|
||||
SUPPORT_URL='http://localhost:18000/support'
|
||||
USER_INFO_COOKIE_NAME='edx-user-info'
|
||||
COLLECT_YEAR_OF_BIRTH='true'
|
||||
|
||||
@@ -583,15 +583,18 @@ class AccountSettingsPage extends React.Component {
|
||||
/>
|
||||
{this.renderSecondaryEmailField(editableFieldProps)}
|
||||
<ResetPassword email={this.props.formValues.email} />
|
||||
<EditableField
|
||||
name="year_of_birth"
|
||||
type="select"
|
||||
label={this.props.intl.formatMessage(messages['account.settings.field.dob'])}
|
||||
emptyLabel={this.props.intl.formatMessage(messages['account.settings.field.dob.empty'])}
|
||||
value={this.props.formValues.year_of_birth}
|
||||
options={yearOfBirthOptions}
|
||||
{...editableFieldProps}
|
||||
/>
|
||||
{(getConfig().COLLECT_YEAR_OF_BIRTH === 'true')
|
||||
&& (
|
||||
<EditableField
|
||||
name="year_of_birth"
|
||||
type="select"
|
||||
label={this.props.intl.formatMessage(messages['account.settings.field.dob'])}
|
||||
emptyLabel={this.props.intl.formatMessage(messages['account.settings.field.dob.empty'])}
|
||||
value={this.props.formValues.year_of_birth}
|
||||
options={yearOfBirthOptions}
|
||||
{...editableFieldProps}
|
||||
/>
|
||||
)}
|
||||
<EditableField
|
||||
name="country"
|
||||
type="select"
|
||||
|
||||
@@ -63,6 +63,7 @@ initialize({
|
||||
COACHING_ENABLED: (process.env.COACHING_ENABLED || false),
|
||||
ENABLE_DEMOGRAPHICS_COLLECTION: (process.env.ENABLE_DEMOGRAPHICS_COLLECTION || false),
|
||||
DEMOGRAPHICS_BASE_URL: process.env.DEMOGRAPHICS_BASE_URL,
|
||||
COLLECT_YEAR_OF_BIRTH: (process.env.COLLECT_YEAR_OF_BIRTH || true),
|
||||
}, 'App loadConfig override handler');
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user