mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
contract form POST
This commit is contained in:
parent
92971a9f62
commit
07ce180ff7
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user