From f59774bd0d259531c6f30ca0afe47aa964ab77ef Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 23 Feb 2017 09:52:33 -0500 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20localize=20an=20empty=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/registration/steps.jsx | 11 ++++++++--- src/views/teacherregistration/l10n.json | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index 4029d1b4c..2807cb19b 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -516,11 +516,10 @@ module.exports = { 'orgChoiceAfterschool', 'orgChoiceMuseum', 'orgChoiceLibrary', - 'orgChoiceCamp', - 'orgChoiceOther' + 'orgChoiceCamp' ], getOrganizationOptions: function () { - return this.organizationL10nStems.map(function (choice, id) { + var options = this.organizationL10nStems.map(function (choice, id) { return { value: id, label: this.props.intl.formatMessage({ @@ -528,6 +527,12 @@ module.exports = { }) }; }.bind(this)); + + // Add "Other" option with empty string, since input field is used + var otherId = options.length; + options.push({value: otherId, label: ' '}); + + return options; }, onChooseOrganization: function (name, values) { this.setState({otherDisabled: values.indexOf(this.organizationL10nStems.indexOf('orgChoiceOther')) === -1}); diff --git a/src/views/teacherregistration/l10n.json b/src/views/teacherregistration/l10n.json index ca3f8a4e1..e00bfea80 100644 --- a/src/views/teacherregistration/l10n.json +++ b/src/views/teacherregistration/l10n.json @@ -21,7 +21,6 @@ "teacherRegistration.orgChoiceMuseum": "Museum", "teacherRegistration.orgChoiceLibrary": "Library", "teacherRegistration.orgChoiceCamp": "Camp", - "teacherRegistration.orgChoiceOther": " ", "teacherRegistration.notRequired": "Not Required", "teacherRegistration.addressValidationError": "This doesn't look like a real address", "teacherRegistration.addressLine1": "Address Line 1",