diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 2675d804..9d2af633 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -242,7 +242,9 @@ let EditionSummary = React.createClass({ actions = ( ); } diff --git a/js/components/ascribe_detail/further_details.js b/js/components/ascribe_detail/further_details.js index d206a3be..9fc5bf15 100644 --- a/js/components/ascribe_detail/further_details.js +++ b/js/components/ascribe_detail/further_details.js @@ -82,6 +82,7 @@ let FurtherDetails = React.createClass({ setIsUploadReady={this.setIsUploadReady} isReadyForFormSubmission={isReadyForFormSubmission} editable={this.props.editable} + overrideForm={true} pieceId={this.props.pieceId} otherData={this.props.otherData} multiple={true}/> diff --git a/js/components/ascribe_detail/piece_container.js b/js/components/ascribe_detail/piece_container.js index fa17d82c..fe1a6c8a 100644 --- a/js/components/ascribe_detail/piece_container.js +++ b/js/components/ascribe_detail/piece_container.js @@ -26,6 +26,8 @@ import CreateEditionsForm from '../ascribe_forms/create_editions_form'; import CreateEditionsButton from '../ascribe_buttons/create_editions_button'; import DeleteButton from '../ascribe_buttons/delete_button'; +import RequestActionForm from '../ascribe_forms/form_request_action'; + import GlobalNotificationModel from '../../models/global_notification_model'; import GlobalNotificationActions from '../../actions/global_notification_actions'; @@ -148,6 +150,38 @@ let PieceContainer = React.createClass({ return {'id': this.state.piece.id}; }, + getActions(){ + if (this.state.piece && + this.state.piece.request_action && + this.state.piece.request_action.length > 0) { + return ( + ); + } + else { + return ( + + + + + ); + } + }, render() { if('title' in this.state.piece) { return ( @@ -170,23 +204,7 @@ let PieceContainer = React.createClass({ } - buttons={ - - - - - }> + buttons={this.getActions()}> {this.getCreateEditionsDialog()} @@ -77,14 +85,12 @@ let RequestActionForm = React.createClass({ }, getAcceptButtonForm(urls) { - let edition = this.props.editions[0]; - - if(edition.request_action === 'unconsign') { + if(this.props.requestAction === 'unconsign') { return ( ); @@ -93,7 +99,9 @@ let RequestActionForm = React.createClass({