From 5ddf89e020a63e2f294f6e5d9b998c4d3c97235a Mon Sep 17 00:00:00 2001 From: diminator Date: Fri, 25 Sep 2015 15:39:36 +0200 Subject: [PATCH] forward to collection after contract sent --- .../ascribe_forms/form_contract_agreement.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_forms/form_contract_agreement.js b/js/components/ascribe_forms/form_contract_agreement.js index 6d47d8e0..ec4a5a81 100644 --- a/js/components/ascribe_forms/form_contract_agreement.js +++ b/js/components/ascribe_forms/form_contract_agreement.js @@ -1,6 +1,7 @@ 'use strict'; import React from 'react'; +import Router from 'react-router'; import ContractListActions from '../../actions/contract_list_actions'; import ContractListStore from '../../stores/contract_list_store'; @@ -20,11 +21,13 @@ import { mergeOptions } from '../../utils/general_utils'; let ContractAgreementForm = React.createClass({ - propTypes: { + propTypes: { handleSuccess: React.PropTypes.func - }, + }, - getInitialState() { + mixins: [Router.Navigation, Router.State], + + getInitialState() { return mergeOptions( ContractListStore.getState(), { @@ -54,7 +57,7 @@ let ContractAgreementForm = React.createClass({ let notification = 'Contract agreement send'; notification = new GlobalNotificationModel(notification, 'success', 10000); GlobalNotificationActions.appendGlobalNotification(notification); - this.refs.form.reset(); + this.transitionTo('pieces'); }, getFormData(){