mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
create contract and agreement
This commit is contained in:
parent
2450dce642
commit
7f39c62130
@ -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() {
|
||||
|
@ -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 (
|
||||
<Form
|
||||
url={ApiUrls.ownership_contract}
|
||||
getFormData={this.getFormData}
|
||||
handleSuccess={this.handleCreateSuccess}
|
||||
buttons={
|
||||
<button
|
||||
type="submit"
|
||||
@ -94,7 +104,7 @@ let CreateContractForm = React.createClass({
|
||||
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}/>
|
||||
</Property>
|
||||
<Property
|
||||
name='contract_name'
|
||||
name='name'
|
||||
label={getLangText('Contract name')}>
|
||||
<input
|
||||
type="text"
|
||||
|
Loading…
Reference in New Issue
Block a user