Don’t localize an empty string

This commit is contained in:
Matthew Taylor 2017-02-23 09:52:33 -05:00
parent df88daea36
commit f59774bd0d
2 changed files with 8 additions and 4 deletions

View file

@ -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});

View file

@ -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",