2016-03-17 17:48:25 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
2016-03-23 11:37:15 +09:00
|
|
|
import Actions from '../../actions.js';
|
2016-04-04 10:21:18 +09:00
|
|
|
import NovaForm from "meteor/nova:forms";
|
2016-02-18 21:39:33 +09:00
|
|
|
|
2016-03-17 17:48:25 +09:00
|
|
|
class CommentEdit extends Component {
|
2016-02-18 21:39:33 +09:00
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2016-04-04 10:21:18 +09:00
|
|
|
<div className="comment-edit">
|
|
|
|
<NovaForm
|
|
|
|
collection={Comments}
|
|
|
|
document={this.props.comment}
|
|
|
|
currentUser={this.context.currentUser}
|
|
|
|
methodName="comments.edit"
|
|
|
|
successCallback={this.props.successCallback}
|
2016-02-18 21:39:33 +09:00
|
|
|
/>
|
2016-04-04 10:21:18 +09:00
|
|
|
<a className="comment-edit-cancel" onClick={this.props.cancelCallback}>Cancel</a>
|
|
|
|
</div>
|
2016-02-18 21:39:33 +09:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2016-03-17 17:48:25 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
CommentEdit.propTypes = {
|
|
|
|
comment: React.PropTypes.object.isRequired,
|
2016-04-04 10:21:18 +09:00
|
|
|
successCallback: React.PropTypes.func,
|
2016-03-17 17:48:25 +09:00
|
|
|
cancelCallback: React.PropTypes.func
|
|
|
|
}
|
2016-02-18 21:39:33 +09:00
|
|
|
|
2016-04-04 10:21:18 +09:00
|
|
|
CommentEdit.contextTypes = {
|
|
|
|
currentUser: React.PropTypes.object
|
|
|
|
}
|
|
|
|
|
2016-02-18 21:39:33 +09:00
|
|
|
module.exports = CommentEdit;
|