1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 21:52:08 +02:00

contract form POST

This commit is contained in:
diminator 2015-09-02 13:57:41 +02:00
parent 92971a9f62
commit 07ce180ff7

View File

@ -18,14 +18,20 @@ let CreateContractForm = React.createClass({
getInitialState() { getInitialState() {
return { return {
digitalWorkKey: null, contractKey: null,
isUploadReady: false isUploadReady: false
}; };
}, },
getFormData(){
return {
blob: this.state.contractKey
};
},
submitKey(key) { submitKey(key) {
this.setState({ this.setState({
digitalWorkKey: key contractKey: key
}); });
}, },
@ -39,6 +45,7 @@ let CreateContractForm = React.createClass({
return ( return (
<Form <Form
url={ApiUrls.ownership_contract} url={ApiUrls.ownership_contract}
getFormData={this.getFormData}
buttons={ buttons={
<button <button
type="submit" type="submit"
@ -87,7 +94,7 @@ let CreateContractForm = React.createClass({
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}/> isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}/>
</Property> </Property>
<Property <Property
name='contract_ name' name='contract_name'
label={getLangText('Contract name')}> label={getLangText('Contract name')}>
<input <input
type="text" type="text"