prompt before giving equal ops

This commit is contained in:
Matthew Hodgson 2016-03-21 00:49:18 +00:00
parent 31ed7b9dd7
commit 59f599af5c
2 changed files with 58 additions and 19 deletions

View file

@ -85,14 +85,20 @@ module.exports = React.createClass({
customPicker = <span> of { input }</span>;
}
var selectValue = roles[this.props.value] || "Custom";
var selectValue;
if (this.state.custom) {
selectValue = "Custom";
}
else {
selectValue = roles[this.props.value] || "Custom";
}
var select;
if (this.props.disabled) {
select = <span>{ selectValue }</span>;
}
else {
select =
<select ref="select" defaultValue={ selectValue } onChange={ this.onSelectChange }>
<select ref="select" value={ selectValue } onChange={ this.onSelectChange }>
<option value="User">User (0)</option>
<option value="Moderator">Moderator (50)</option>
<option value="Admin">Admin (100)</option>