1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 00:28:00 +02:00

getlangtext

This commit is contained in:
diminator 2015-08-21 16:38:18 +02:00
parent f564ce7959
commit 33cd23d11e
3 changed files with 10 additions and 11 deletions

View File

@ -25,7 +25,6 @@ import CollapsibleParagraph from './../ascribe_collapsible/collapsible_paragraph
import Form from './../ascribe_forms/form';
import Property from './../ascribe_forms/property';
import EditionDetailProperty from './detail_property';
import InputTextAreaToggable from './../ascribe_forms/input_textarea_toggable';
import EditionFurtherDetails from './further_details';
@ -163,19 +162,19 @@ let Edition = React.createClass({
id={this.getId}
label={getLangText('Personal note (private)')}
defaultValue={this.props.edition.private_note ? this.props.edition.private_note : null}
placeholder='Enter your comments ...'
placeholder={getLangText('Enter your comments ...')}
editable={true}
successMessage='Private note saved'
successMessage={getLangText('Private note saved')}
url={ApiUrls.note_private_edition}
currentUser={this.state.currentUser}/>
<Note
id={this.getId}
label={getLangText('Edition note (public)')}
defaultValue={this.props.edition.public_note ? this.props.edition.public_note : null}
placeholder='Enter your comments ...'
placeholder={getLangText('Enter your comments ...')}
editable={!!this.props.edition.acl.acl_edit}
show={!!this.props.edition.public_note || !!this.props.edition.acl.acl_edit}
successMessage='Public edition note saved'
successMessage={getLangText('Public edition note saved')}
url={ApiUrls.note_public_edition}
currentUser={this.state.currentUser}/>
</CollapsibleParagraph>

View File

@ -28,8 +28,8 @@ let Note = React.createClass({
return {
editable: true,
show: true,
placeholder: 'Enter a note',
successMessage: 'Note saved'
placeholder: getLangText('Enter a note'),
successMessage: getLangText('Note saved')
};
},

View File

@ -196,21 +196,21 @@ let PieceContainer = React.createClass({
history={this.state.piece.loan_history} />
</CollapsibleParagraph>
<CollapsibleParagraph
title="Notes"
title={getLangText('Notes')}
show={(this.state.currentUser.username && true || false) ||
(this.state.piece.public_note)}>
<Note
id={this.getId}
label={getLangText('Personal note (private)')}
defaultValue={this.state.piece.private_note ? this.state.piece.private_note : null}
placeholder='Enter your comments ...'
placeholder={getLangText('Enter your comments ...')}
editable={true}
successMessage='Private note saved'
successMessage={getLangText('Private note saved')}
url={ApiUrls.note_private_piece}
currentUser={this.state.currentUser}/>
</CollapsibleParagraph>
<CollapsibleParagraph
title="Further Details"
title={getLangText('Further Details')}
show={this.state.piece.acl.acl_edit
|| Object.keys(this.state.piece.extra_data).length > 0
|| this.state.piece.other_data.length > 0}