mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
prize extra data form detail
This commit is contained in:
parent
d03f98af76
commit
049a5a6fcb
@ -71,25 +71,31 @@ let PrizePieceDetails = React.createClass({
|
|||||||
piece: React.PropTypes.object
|
piece: React.PropTypes.object
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
if (this.props.piece.prize && this.props.piece.prize.name){
|
if (this.props.piece.prize
|
||||||
|
&& this.props.piece.prize.name
|
||||||
|
&& Object.keys(this.props.piece.extra_data).length !== 0){
|
||||||
return (
|
return (
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title="Prize Details"
|
title="Prize Details"
|
||||||
show={true}
|
show={true}
|
||||||
defaultExpanded={true}>
|
defaultExpanded={true}>
|
||||||
<Form
|
<Form ref='form'>
|
||||||
ref='form'>
|
{Object.keys(this.props.piece.extra_data).map((data) => {
|
||||||
<Property
|
let label = data.replace('_', ' ');
|
||||||
name='test'
|
return (
|
||||||
label='test'
|
<Property
|
||||||
editable={false}>
|
name={data}
|
||||||
<InputTextAreaToggable
|
label={label}
|
||||||
rows={1}
|
editable={false}>
|
||||||
editable={false}
|
<InputTextAreaToggable
|
||||||
defaultValue='test'/>
|
rows={1}
|
||||||
</Property>
|
editable={false}
|
||||||
<hr />
|
defaultValue={this.props.piece.extra_data[data]}/>
|
||||||
</Form>
|
</Property>);
|
||||||
|
}
|
||||||
|
)}
|
||||||
|
<hr />
|
||||||
|
</Form>
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user