mirror of
https://github.com/ascribe/onion.git
synced 2024-06-30 21:52:08 +02:00
create contract and agreement
This commit is contained in:
parent
2450dce642
commit
7f39c62130
|
@ -56,7 +56,7 @@ let ContractAgreementForm = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
getFormData(){
|
getFormData(){
|
||||||
return {'appendix': {'default': this.refs.form.refs.appendix.value}}
|
return {'appendix': {'default': this.refs.form.refs.appendix.state.value}};
|
||||||
},
|
},
|
||||||
|
|
||||||
getContracts() {
|
getContracts() {
|
||||||
|
|
|
@ -5,6 +5,9 @@ import React from 'react';
|
||||||
import Form from '../ascribe_forms/form';
|
import Form from '../ascribe_forms/form';
|
||||||
import Property from '../ascribe_forms/property';
|
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 ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader';
|
||||||
|
|
||||||
import AppConstants from '../../constants/application_constants';
|
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() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
url={ApiUrls.ownership_contract}
|
url={ApiUrls.ownership_contract}
|
||||||
getFormData={this.getFormData}
|
getFormData={this.getFormData}
|
||||||
|
handleSuccess={this.handleCreateSuccess}
|
||||||
buttons={
|
buttons={
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
@ -94,7 +104,7 @@ let CreateContractForm = React.createClass({
|
||||||
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}/>
|
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property
|
<Property
|
||||||
name='contract_name'
|
name='name'
|
||||||
label={getLangText('Contract name')}>
|
label={getLangText('Contract name')}>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user