diff --git a/js/components/ascribe_forms/form_contract_agreement.js b/js/components/ascribe_forms/form_contract_agreement.js index 747bdfa4..1d9f7c72 100644 --- a/js/components/ascribe_forms/form_contract_agreement.js +++ b/js/components/ascribe_forms/form_contract_agreement.js @@ -56,7 +56,7 @@ let ContractAgreementForm = React.createClass({ }, getFormData(){ - return {'appendix': {'default': this.refs.form.refs.appendix.value}} + return {'appendix': {'default': this.refs.form.refs.appendix.state.value}}; }, getContracts() { diff --git a/js/components/ascribe_forms/form_create_contract.js b/js/components/ascribe_forms/form_create_contract.js index 416ae0e5..a5f719e2 100644 --- a/js/components/ascribe_forms/form_create_contract.js +++ b/js/components/ascribe_forms/form_create_contract.js @@ -5,6 +5,9 @@ import React from 'react'; import Form from '../ascribe_forms/form'; import Property from '../ascribe_forms/property'; +import GlobalNotificationModel from '../../models/global_notification_model'; +import GlobalNotificationActions from '../../actions/global_notification_actions'; + import ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader'; import AppConstants from '../../constants/application_constants'; @@ -41,11 +44,18 @@ let CreateContractForm = React.createClass({ }); }, + handleCreateSuccess(response) { + let notification = new GlobalNotificationModel(getLangText('Contract %s successfully created', response.name), 'success', 5000); + GlobalNotificationActions.appendGlobalNotification(notification); + }, + + render() { return (