From 9f842887b5f65fd8c16ade74db70ca2bf1a5914b Mon Sep 17 00:00:00 2001 From: Jeremy Booker Date: Tue, 28 Mar 2017 11:43:31 -0400 Subject: [PATCH] Fix minor bugs in affiliation agreement reactjs. Must be using a newer version of react than when this was first developed. --- javascript/affiliationAgreement/AffiliationDepartments.jsx | 4 ++-- javascript/affiliationAgreement/AffiliationLocation.jsx | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/javascript/affiliationAgreement/AffiliationDepartments.jsx b/javascript/affiliationAgreement/AffiliationDepartments.jsx index 1014dad4..123490de 100644 --- a/javascript/affiliationAgreement/AffiliationDepartments.jsx +++ b/javascript/affiliationAgreement/AffiliationDepartments.jsx @@ -43,12 +43,11 @@ var DepartmentList = React.createClass({ var DepartmentDropdown = React.createClass({ add: function() { - var deptToAdd = this.refs.deptChoices.getDOMNode().value; + var deptToAdd = this.refs.deptChoices.value; this.props.onAdd(deptToAdd); }, render: function() { var options = this.props.departments; - options.unshift({id:0, name: "Select a Department"}); var selectOptions = options.map(function(department){ @@ -74,6 +73,7 @@ var DepartmentDropdown = React.createClass({
diff --git a/javascript/affiliationAgreement/AffiliationLocation.jsx b/javascript/affiliationAgreement/AffiliationLocation.jsx index 246ebc82..9387fd89 100644 --- a/javascript/affiliationAgreement/AffiliationLocation.jsx +++ b/javascript/affiliationAgreement/AffiliationLocation.jsx @@ -39,13 +39,11 @@ var LocationList = React.createClass({ var LocationDropdown = React.createClass({ add: function() { - var locToAdd = this.refs.locChoices.getDOMNode().value; + var locToAdd = this.refs.locChoices.value; this.props.onAdd(locToAdd); }, render: function() { var options = this.props.locations; - // Adds Select a State to the data array. - options.unshift({full_name: "Select a State", abbr: "-1"}); var selectOptions = options.map(function(location){ @@ -71,6 +69,7 @@ var LocationDropdown = React.createClass({