Adjust labels depending on first/other suggestions/vetoes
This commit is contained in:
parent
0400dd06b6
commit
d24c324398
@ -102,11 +102,17 @@ module.exports = React.createClass({
|
||||
render: function() {
|
||||
var attendeeList = this.getAttendeeList();
|
||||
var buttonDisabled = this.state.attendee == null || !this.state.suggestion;
|
||||
var suggestionLabel = "Add Suggestion To:";
|
||||
var byLabel = "Suggested By:"
|
||||
if (Object.keys(this.props.suggestions).length > 0) {
|
||||
suggestionLabel = "Veto With:";
|
||||
byLabel = "Vetoed By:"
|
||||
}
|
||||
return (
|
||||
<Row>
|
||||
<Col xs={4}>
|
||||
<FormGroup controlId="newsuggestionrestaurantname">
|
||||
<ControlLabel>Add Suggestion/Veto To:</ControlLabel>
|
||||
<ControlLabel>{suggestionLabel}</ControlLabel>
|
||||
<Combobox
|
||||
value={this.state.suggestion}
|
||||
data={this.unusedPopularSuggestions()}
|
||||
@ -118,7 +124,7 @@ module.exports = React.createClass({
|
||||
<Col xs={1}></Col>
|
||||
<Col xs={4}>
|
||||
<FormGroup controlId="newsuggestionby">
|
||||
<ControlLabel>Suggested By:</ControlLabel>
|
||||
<ControlLabel>{byLabel}</ControlLabel>
|
||||
<Combobox
|
||||
value={this.state.attendee}
|
||||
data={attendeeList}
|
||||
|
@ -43,7 +43,7 @@ const LoginBar = React.createClass({
|
||||
<Col xs={4}></Col>
|
||||
<Col xs={2}>
|
||||
<Button bsStyle="link"
|
||||
onClick={this.handleNewUserSubmit}>Create New User</Button>
|
||||
onClick={this.handleNewUserSubmit}>New User</Button>
|
||||
</Col>
|
||||
<Col xs={2}>
|
||||
<FormControl type="text"
|
||||
|
Loading…
Reference in New Issue
Block a user