2016-11-22 16:46:32 +09:00
|
|
|
/*
|
|
|
|
|
|
|
|
A component to configure the "edit movie" form.
|
2016-12-12 09:54:16 +09:00
|
|
|
Wrapped with the "withDocument" container.
|
2016-11-22 16:46:32 +09:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-11-22 16:15:00 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
2017-02-19 11:05:26 +01:00
|
|
|
import { Components, registerComponent, getFragment } from "meteor/nova:core";
|
|
|
|
import Movies from '../modules/collection.js';
|
2016-11-22 16:15:00 +09:00
|
|
|
|
2017-02-19 11:05:26 +01:00
|
|
|
const MoviesEditForm = props =>
|
|
|
|
<Components.SmartForm
|
|
|
|
collection={Movies}
|
|
|
|
documentId={props.documentId}
|
|
|
|
mutationFragment={getFragment('MoviesItemFragment')}
|
|
|
|
showRemove={true}
|
|
|
|
successCallback={document => {
|
|
|
|
props.closeModal();
|
|
|
|
}}
|
|
|
|
/>
|
2016-11-22 16:15:00 +09:00
|
|
|
|
2017-01-18 12:51:10 +01:00
|
|
|
registerComponent('MoviesEditForm', MoviesEditForm);
|