mirror of
https://github.com/ascribe/onion.git
synced 2024-06-30 13:41:57 +02:00
contract settings update
This commit is contained in:
parent
9ad713f781
commit
e892becc50
|
@ -56,12 +56,14 @@ let ContractAgreementForm = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
getFormData(){
|
getFormData(){
|
||||||
return {'appendix': {'default': this.refs.form.refs.appendix.state.value}};
|
return {'appendix': {'default': this.refs.form.refs.appendix.state.value},
|
||||||
|
'contract': this.state.contractList[this.state.selectedContract].id};
|
||||||
},
|
},
|
||||||
|
|
||||||
getContracts() {
|
getContracts() {
|
||||||
if (this.state.contractList && this.state.contractList.length > 0) {
|
if (this.state.contractList && this.state.contractList.length > 0) {
|
||||||
let contractList = this.state.contractList;
|
let contractList = this.state.contractList;
|
||||||
|
console.log(contractList)
|
||||||
return (
|
return (
|
||||||
<Property
|
<Property
|
||||||
name='contract'
|
name='contract'
|
||||||
|
|
|
@ -39,7 +39,7 @@ let ContractSettings = React.createClass({
|
||||||
|
|
||||||
makeContractPublic(contract) {
|
makeContractPublic(contract) {
|
||||||
return () => {
|
return () => {
|
||||||
contract.public = true;
|
contract.is_public = true;
|
||||||
ContractListActions.changeContract(contract)
|
ContractListActions.changeContract(contract)
|
||||||
.then(() => ContractListActions.fetchContractList())
|
.then(() => ContractListActions.fetchContractList())
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user