1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Set the default editable status of the MarketFurtherDetails to be false

Non-owners don't get provided an acl_edit in their edition acls, so the
default behaviour of MarketAdditionalDetailsForm was to set the form to
be editable.
This commit is contained in:
Brett Sun 2016-04-25 17:32:59 +02:00
parent b3f34e21e3
commit c12a5f4977

View File

@ -2,7 +2,7 @@
import React from 'react'; import React from 'react';
import MarketAdditionalDataForm from '../market_forms/market_additional_data_form' import MarketAdditionalDataForm from '../market_forms/market_additional_data_form';
let MarketFurtherDetails = React.createClass({ let MarketFurtherDetails = React.createClass({
propTypes: { propTypes: {
@ -14,6 +14,13 @@ let MarketFurtherDetails = React.createClass({
otherData: React.PropTypes.arrayOf(React.PropTypes.object) otherData: React.PropTypes.arrayOf(React.PropTypes.object)
}, },
getDefaultProps() {
// Override MarketAdditionalDataForm's default `editable` setting of true
return {
editable: false
};
},
render() { render() {
return ( return (
<MarketAdditionalDataForm <MarketAdditionalDataForm