2016-03-17 17:48:25 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
2016-04-14 10:12:35 +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-04-14 10:12:35 +09:00
|
|
|
class CommentsEdit extends Component {
|
2016-02-18 21:39:33 +09:00
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2016-04-08 10:29:32 +09:00
|
|
|
<div className="comment-edit-form">
|
2016-04-04 10:21:18 +09:00
|
|
|
<NovaForm
|
|
|
|
collection={Comments}
|
|
|
|
document={this.props.comment}
|
|
|
|
currentUser={this.context.currentUser}
|
|
|
|
methodName="comments.edit"
|
|
|
|
successCallback={this.props.successCallback}
|
2016-04-08 10:29:32 +09:00
|
|
|
layout="elementOnly"
|
|
|
|
cancelCallback={this.props.cancelCallback}
|
2016-02-18 21:39:33 +09:00
|
|
|
/>
|
2016-04-04 10:21:18 +09:00
|
|
|
</div>
|
2016-02-18 21:39:33 +09:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2016-03-17 17:48:25 +09:00
|
|
|
}
|
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
CommentsEdit.propTypes = {
|
2016-03-17 17:48:25 +09:00
|
|
|
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-14 10:12:35 +09:00
|
|
|
CommentsEdit.contextTypes = {
|
2016-04-04 10:21:18 +09:00
|
|
|
currentUser: React.PropTypes.object
|
|
|
|
}
|
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
module.exports = CommentsEdit;
|