mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
Fix render bug for personal piece note
This commit is contained in:
parent
81f28a02f9
commit
8fcb7fcb01
@ -12,7 +12,9 @@ const CollapsibleParagraph = React.createClass({
|
||||
React.PropTypes.object,
|
||||
React.PropTypes.array
|
||||
]),
|
||||
iconName: React.PropTypes.string
|
||||
iconName: React.PropTypes.string,
|
||||
show: React.PropTypes.bool,
|
||||
defaultExpanded: React.PropTypes.bool
|
||||
},
|
||||
|
||||
getDefaultProps() {
|
||||
|
@ -136,7 +136,7 @@ let Edition = React.createClass({
|
||||
currentUser={this.state.currentUser}/>
|
||||
<Note
|
||||
id={() => {return {'bitcoin_id': this.props.edition.bitcoin_id}; }}
|
||||
label={getLangText('Edition note (public)')}
|
||||
label={getLangText('Personal note (public)')}
|
||||
defaultValue={this.props.edition.public_note ? this.props.edition.public_note : null}
|
||||
placeholder={getLangText('Enter your comments ...')}
|
||||
editable={!!this.props.edition.acl.acl_edit}
|
||||
|
@ -258,7 +258,9 @@ let PieceContainer = React.createClass({
|
||||
</CollapsibleParagraph>
|
||||
<CollapsibleParagraph
|
||||
title={getLangText('Notes')}
|
||||
show={(!!(this.state.currentUser.username || this.state.piece.public_note))}>
|
||||
show={!!(this.state.currentUser.username
|
||||
|| this.state.piece.acl.acl_edit
|
||||
|| this.state.piece.public_note)}>
|
||||
<Note
|
||||
id={this.getId}
|
||||
label={getLangText('Personal note (private)')}
|
||||
@ -275,6 +277,7 @@ let PieceContainer = React.createClass({
|
||||
defaultValue={this.state.piece.public_note || null}
|
||||
placeholder={getLangText('Enter your comments ...')}
|
||||
editable={!!this.state.piece.acl.acl_edit}
|
||||
show={!!this.state.piece.public_note || !!this.state.piece.acl.acl_edit}
|
||||
successMessage={getLangText('Public note saved')}
|
||||
url={ApiUrls.note_public_piece}
|
||||
currentUser={this.state.currentUser}/>
|
||||
|
Loading…
Reference in New Issue
Block a user