diff --git a/public/js/components/feature/Feature.jsx b/public/js/components/feature/Feature.jsx index 823b03debd..26b5e7cee8 100644 --- a/public/js/components/feature/Feature.jsx +++ b/public/js/components/feature/Feature.jsx @@ -1,22 +1,42 @@ var React = require('react'); +var FeatureForm = require('./FeatureForm'); var Feature = React.createClass({ - onChange: function(event) { + getInitialState: function() { + return { + editMode: false + }; + }, + + toggleEditMode: function() { + this.setState({editMode: !this.state.editMode}); + }, + + saveFeature: function(feature) { this.props.onChange({ - name: this.props.feature.name, + name: feature.name, field: 'enabled', - value: event.target.checked + value: feature.enabled }); + this.toggleEditMode(); }, render: function() { - return ( -