2016-11-22 16:46:32 +09:00
|
|
|
/*
|
|
|
|
|
|
|
|
A component to configure the "new movie" form.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React, { PropTypes, Component } from 'react';
|
|
|
|
import Movies from '../collection.js';
|
2016-12-18 19:04:11 +09:00
|
|
|
import { MoviesListFragment } from './MoviesList.jsx';
|
2017-01-18 12:51:10 +01:00
|
|
|
import { Components, registerComponent, withMessages } from 'meteor/nova:core';
|
2016-11-22 16:46:32 +09:00
|
|
|
|
|
|
|
const MoviesNewForm = (props, context) => {
|
|
|
|
return (
|
2017-01-18 12:51:10 +01:00
|
|
|
<Components.SmartForm
|
2016-12-18 19:04:11 +09:00
|
|
|
collection={Movies}
|
2017-01-13 09:21:07 +01:00
|
|
|
mutationFragment={MoviesListFragment}
|
2016-11-22 16:46:32 +09:00
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
MoviesNewForm.contextTypes = {
|
|
|
|
closeCallback: React.PropTypes.func,
|
|
|
|
}
|
2017-01-18 12:51:10 +01:00
|
|
|
|
|
|
|
registerComponent('MoviesNewForm', MoviesNewForm, withMessages);
|