Skip to content

Commit

Permalink
Fix minor bugs in affiliation agreement reactjs. Must be using a newe…
Browse files Browse the repository at this point in the history
…r version of react than when this was first developed.
  • Loading branch information
jlbooker committed Mar 28, 2017
1 parent 742c1fe commit 9f84288
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions javascript/affiliationAgreement/AffiliationDepartments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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){

Expand All @@ -74,6 +73,7 @@ var DepartmentDropdown = React.createClass({
<div>
<div className="form-group">
<select className="form-control" ref="deptChoices">
<option value="-1">Select a Department"</option>
{selectOptions}
</select>
</div>
Expand Down
5 changes: 2 additions & 3 deletions javascript/affiliationAgreement/AffiliationLocation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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){

Expand All @@ -71,6 +69,7 @@ var LocationDropdown = React.createClass({
<div className="LocationDropdown">
<div className="form-group">
<select className="form-control" ref="locChoices">
<option value="-1">Select a State</option>
{selectOptions}
</select>
</div>
Expand Down

0 comments on commit 9f84288

Please sign in to comment.