diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index a2156eb0..2675d804 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -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'; @@ -107,7 +106,6 @@ let Edition = React.createClass({ }, render() { - console.log(!!this.props.edition.public_note || this.props.edition.acl.acl_edit) return ( @@ -164,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}/> @@ -315,84 +313,6 @@ let EditionSummary = React.createClass({ }); -let EditionPersonalNote = React.createClass({ - propTypes: { - edition: React.PropTypes.object, - currentUser: React.PropTypes.object, - handleSuccess: React.PropTypes.func - }, - showNotification(){ - this.props.handleSuccess(); - let notification = new GlobalNotificationModel(getLangText('Private note saved'), 'success'); - GlobalNotificationActions.appendGlobalNotification(notification); - }, - - render() { - if (this.props.currentUser.username && true || false) { - return ( -
- - - - -
-
- ); - } - return null; - } -}); - -let EditionPublicEditionNote = React.createClass({ - propTypes: { - edition: React.PropTypes.object, - handleSuccess: React.PropTypes.func - }, - showNotification(){ - this.props.handleSuccess(); - let notification = new GlobalNotificationModel(getLangText('Public note saved'), 'success'); - GlobalNotificationActions.appendGlobalNotification(notification); - }, - render() { - let isEditable = this.props.edition.acl.acl_edit; - if (isEditable || this.props.edition.public_note){ - return ( -
- - - - -
-
- ); - } - return null; - } -}); - let CoaDetails = React.createClass({ propTypes: { edition: React.PropTypes.object diff --git a/js/components/ascribe_detail/note.js b/js/components/ascribe_detail/note.js index e41a3184..0f32e5da 100644 --- a/js/components/ascribe_detail/note.js +++ b/js/components/ascribe_detail/note.js @@ -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') }; }, @@ -39,7 +39,7 @@ let Note = React.createClass({ }, render() { - if ((this.props.currentUser.username && true || false) && this.props.show) { + if (!!this.props.currentUser.username && this.props.show) { return (
0 || this.state.piece.other_data.length > 0}