1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-14 21:10:27 +01:00

forward to collection after contract sent

This commit is contained in:
diminator 2015-09-25 15:39:36 +02:00
parent b2cbe2c674
commit 5ddf89e020

View File

@ -1,6 +1,7 @@
'use strict'; 'use strict';
import React from 'react'; import React from 'react';
import Router from 'react-router';
import ContractListActions from '../../actions/contract_list_actions'; import ContractListActions from '../../actions/contract_list_actions';
import ContractListStore from '../../stores/contract_list_store'; import ContractListStore from '../../stores/contract_list_store';
@ -20,11 +21,13 @@ import { mergeOptions } from '../../utils/general_utils';
let ContractAgreementForm = React.createClass({ let ContractAgreementForm = React.createClass({
propTypes: { propTypes: {
handleSuccess: React.PropTypes.func handleSuccess: React.PropTypes.func
}, },
getInitialState() { mixins: [Router.Navigation, Router.State],
getInitialState() {
return mergeOptions( return mergeOptions(
ContractListStore.getState(), ContractListStore.getState(),
{ {
@ -54,7 +57,7 @@ let ContractAgreementForm = React.createClass({
let notification = 'Contract agreement send'; let notification = 'Contract agreement send';
notification = new GlobalNotificationModel(notification, 'success', 10000); notification = new GlobalNotificationModel(notification, 'success', 10000);
GlobalNotificationActions.appendGlobalNotification(notification); GlobalNotificationActions.appendGlobalNotification(notification);
this.refs.form.reset(); this.transitionTo('pieces');
}, },
getFormData(){ getFormData(){