diff --git a/app/components/BookBuilder/Chapter/UploadButton.jsx b/app/components/BookBuilder/Chapter/UploadButton.jsx index 697d7f01d9019a0def9fd2f1486ca31fc578a125..cdb280d4baaafb536e54f060a0ad2db309f849ee 100644 --- a/app/components/BookBuilder/Chapter/UploadButton.jsx +++ b/app/components/BookBuilder/Chapter/UploadButton.jsx @@ -75,13 +75,15 @@ export class UploadButton extends React.Component { if (!this.isLocked()) return null const { showModal } = this.state - const { modalContainer } = this.props + const { chapter, modalContainer } = this.props + const type = chapter.subCategory return ( <UploadWarningModal container={modalContainer} show={showModal} toggle={this.toggleModal} + type={type} /> ) } diff --git a/app/components/BookBuilder/Chapter/UploadWarningModal.jsx b/app/components/BookBuilder/Chapter/UploadWarningModal.jsx index 3f946bb3eea23db4cac4dac8ca6b7f916a828dbb..a8fe28fc90ec122a0049bd5601bf358598b2b487 100644 --- a/app/components/BookBuilder/Chapter/UploadWarningModal.jsx +++ b/app/components/BookBuilder/Chapter/UploadWarningModal.jsx @@ -4,9 +4,11 @@ import AbstractModal from '../../common/AbstractModal' class UploadWarningModal extends React.Component { renderBody () { + const { type } = this.props + return ( <div> - You are not allowed to import contents while a chapter is being edited. + You are not allowed to import contents while a { type } is being edited. </div> ) } @@ -31,7 +33,8 @@ class UploadWarningModal extends React.Component { UploadWarningModal.propTypes = { container: React.PropTypes.object.isRequired, show: React.PropTypes.bool.isRequired, - toggle: React.PropTypes.func.isRequired + toggle: React.PropTypes.func.isRequired, + type: React.PropTypes.string.isRequired } export default UploadWarningModal