diff --git a/js/components/ascribe_detail/edition_container.js b/js/components/ascribe_detail/edition_container.js index bd13e118..f28b2d37 100644 --- a/js/components/ascribe_detail/edition_container.js +++ b/js/components/ascribe_detail/edition_container.js @@ -90,7 +90,7 @@ let EditionContainer = React.createClass({ const { edition, currentUser, coaMeta } = this.state; const { actionPanelButtonListType, furtherDetailsType } = this.props; - if (Object.keys(edition).length && edition.id) { + if (edition.id) { setDocumentTitle([edition.artist_name, edition.title].join(', ')); return ( diff --git a/js/components/ascribe_detail/further_details.js b/js/components/ascribe_detail/further_details.js index c178fb93..9caee1b9 100644 --- a/js/components/ascribe_detail/further_details.js +++ b/js/components/ascribe_detail/further_details.js @@ -19,11 +19,12 @@ import { formSubmissionValidation } from '../ascribe_uploader/react_s3_fine_uplo let FurtherDetails = React.createClass({ propTypes: { + pieceId: React.PropTypes.number.isRequired, + editable: React.PropTypes.bool, - pieceId: React.PropTypes.number, extraData: React.PropTypes.object, + handleSuccess: React.PropTypes.func, otherData: React.PropTypes.arrayOf(React.PropTypes.object), - handleSuccess: React.PropTypes.func }, getInitialState() { @@ -32,13 +33,16 @@ let FurtherDetails = React.createClass({ }; }, - showNotification(){ - this.props.handleSuccess(); - let notification = new GlobalNotificationModel('Details updated', 'success'); + showNotification() { + if (typeof this.props.handleSucess === 'function') { + this.props.handleSuccess(); + } + + const notification = new GlobalNotificationModel('Details updated', 'success'); GlobalNotificationActions.appendGlobalNotification(notification); }, - submitFile(file){ + submitFile(file) { this.setState({ otherDataKey: file.key }); @@ -60,8 +64,7 @@ let FurtherDetails = React.createClass({ handleSuccess={this.showNotification} editable={this.props.editable} pieceId={this.props.pieceId} - extraData={this.props.extraData} - /> + extraData={this.props.extraData} /> + disabled={!editable}> + name={name} + label={title}>
diff --git a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js index 2d31b13c..d2f824a4 100644 --- a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js +++ b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js @@ -126,7 +126,7 @@ let MarketSubmitButton = React.createClass({ aclName='acl_consign'> this.handleAdditionalDataSuccess(solePieceId)} title={getLangText('Add additional information')}>