fixed email component

This commit is contained in:
Anton Dyudin 2015-09-24 11:07:34 -07:00
parent 29835e1fe0
commit e21a202fbf
2 changed files with 10 additions and 8 deletions

View File

@ -29,7 +29,7 @@ module.exports = recl
@$email.addClass 'error'
submit: ->
$.post @props.dataPath,{email:@$email.text()},() ->
$.post @props.dataPath,{email:@$email.val()},() =>
@setState {submit:true}
componentDidMount: -> @$email = $('input.email')

View File

@ -506,12 +506,14 @@ module.exports = recl({
},
submit: function() {
return $.post(this.props.dataPath, {
email: this.$email.text()
}, function() {
return this.setState({
submit: true
});
});
email: this.$email.val()
}, (function(_this) {
return function() {
return _this.setState({
submit: true
});
};
})(this));
},
componentDidMount: function() {
return this.$email = $('input.email');