var React = require('react'); var FeatureForm = React.createClass({ render: function() { return (
); }, saveFeature: function(e) { e.preventDefault(); var feature = { name: this.refs.name.getDOMNode().value, description: this.refs.description.getDOMNode().value, strategy: this.refs.strategy.getDOMNode().value, enabled: this.refs.enabled.getDOMNode().checked } this.props.onSubmit(feature); }, cancelFeature: function(e) { e.preventDefault(); this.props.onCancel(); } }); module.exports = FeatureForm;