diff --git a/src/account-settings/AccountSettingsPage.jsx b/src/account-settings/AccountSettingsPage.jsx index 724ed94..49ac950 100644 --- a/src/account-settings/AccountSettingsPage.jsx +++ b/src/account-settings/AccountSettingsPage.jsx @@ -119,33 +119,40 @@ class AccountSettingsPage extends React.Component { demographicsGenderOptions: DEMOGRAPHICS_GENDER_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.gender.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), demographicsEthnicityOptions: DEMOGRAPHICS_ETHNICITY_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.ethnicity.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), demographicsIncomeOptions: DEMOGRAPHICS_INCOME_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.income.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), demographicsMilitaryHistoryOptions: DEMOGRAPHICS_MILITARY_HISTORY_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.military_history.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), demographicsEducationLevelOptions: DEMOGRAPHICS_EDUCATION_LEVEL_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.education_level.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), demographicsWorkStatusOptions: DEMOGRAPHICS_WORK_STATUS_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.work_status.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), demographicsWorkSectorOptions: DEMOGRAPHICS_WORK_SECTOR_OPTIONS.map(key => ({ value: key, label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.work_sector.options.${key || 'empty'}`]), - })), + })).concat(this.getDeclinedOption()), })); + getDeclinedOption() { + return [{ + value: 'declined', + label: this.props.intl.formatMessage(messages[`account.settings.field.demographics.options.declined`]) + }] + } + isEditable(fieldName) { return !this.props.staticFields.includes(fieldName); } diff --git a/src/account-settings/AccountSettingsPage.messages.jsx b/src/account-settings/AccountSettingsPage.messages.jsx index 7576205..331cb45 100644 --- a/src/account-settings/AccountSettingsPage.messages.jsx +++ b/src/account-settings/AccountSettingsPage.messages.jsx @@ -713,6 +713,11 @@ const messages = defineMessages({ defaultMessage: 'Other', description: 'The label for the Other work sector option.', }, + 'account.settings.field.demographics.options.declined': { + id: 'account.settings.field.demographics.options.declined', + defaultMessage: 'Prefer not to respond', + description: 'The label for the declined option.', + }, 'account.settings.field.time.zone': { id: 'account.settings.field.time.zone',