@@ -125,10 +125,12 @@ module.exports = React.createClass({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
removeInviteFields: function(index) {
|
removeInviteFields: function(index) {
|
||||||
|
var count = this.state.id_count;
|
||||||
var invite_ids = this.state.invite_ids;
|
var invite_ids = this.state.invite_ids;
|
||||||
var i = invite_ids.indexOf(index);
|
var i = invite_ids.indexOf(index);
|
||||||
if (index > -1) invite_ids.splice(i, 1);
|
if (i > -1) invite_ids.splice(i, 1);
|
||||||
this.setState({ invite_ids: invite_ids });
|
if (!invite_ids.length) invite_ids.push(++count);
|
||||||
|
this.setState({ invite_ids: invite_ids, id_count: count });
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
@@ -154,11 +156,9 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
invite_sections[index] = (
|
invite_sections[index] = (
|
||||||
<div key={"key" + index}>
|
<div key={"key" + index}>
|
||||||
{ i ?
|
|
||||||
<div>
|
<div>
|
||||||
<button type="button" className="btn remove__member" onClick={function(){self.removeInviteFields(index);}}>×</button>
|
<button type="button" className="btn remove__member" onClick={this.removeInviteFields.bind(this, index)}>×</button>
|
||||||
</div>
|
</div>
|
||||||
: ""}
|
|
||||||
<div className={ email_error ? "form-group invite has-error" : "form-group invite" }>
|
<div className={ email_error ? "form-group invite has-error" : "form-group invite" }>
|
||||||
<input onKeyUp={this.displayNameKeyUp} type="text" ref={"email"+index} className="form-control" placeholder="email@domain.com" maxLength="64" />
|
<input onKeyUp={this.displayNameKeyUp} type="text" ref={"email"+index} className="form-control" placeholder="email@domain.com" maxLength="64" />
|
||||||
{ email_error }
|
{ email_error }
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user