From 1ee9a4c7a142eff28904b0da8dc1a51a0a28c36a Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Wed, 9 Dec 2015 18:29:43 +0100 Subject: [PATCH] Hide download button on the marketplace additional data form when it's not inline --- .../ascribe_detail/further_details_fileuploader.js | 6 ++++-- .../file_drag_and_drop_preview_image.js | 2 +- .../market/market_forms/market_additional_data_form.js | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_detail/further_details_fileuploader.js b/js/components/ascribe_detail/further_details_fileuploader.js index b044bbbc..60769598 100644 --- a/js/components/ascribe_detail/further_details_fileuploader.js +++ b/js/components/ascribe_detail/further_details_fileuploader.js @@ -22,11 +22,13 @@ let FurtherDetailsFileuploader = React.createClass({ submitFile: React.PropTypes.func, isReadyForFormSubmission: React.PropTypes.func, editable: React.PropTypes.bool, - multiple: React.PropTypes.bool + multiple: React.PropTypes.bool, + areAssetsDownloadable: React.PropTypes.bool }, getDefaultProps() { return { + areAssetsDownloadable: true, label: getLangText('Additional files'), multiple: false }; @@ -89,7 +91,7 @@ let FurtherDetailsFileuploader = React.createClass({ 'X-CSRFToken': getCookie(AppConstants.csrftoken) } }} - areAssetsDownloadable={true} + areAssetsDownloadable={this.props.areAssetsDownloadable} areAssetsEditable={this.props.editable} multiple={this.props.multiple} /> diff --git a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview_image.js b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview_image.js index 927a5b22..0d8d366c 100644 --- a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview_image.js +++ b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview_image.js @@ -49,7 +49,7 @@ const FileDragAndDropPreviewImage = React.createClass({ }; let actionSymbol; - + // only if assets are actually downloadable, there should be a download icon if the process is already at // 100%. If not, no actionSymbol should be displayed if(progress === 100 && areAssetsDownloadable) { diff --git a/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js b/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js index d136c9cf..2a22e743 100644 --- a/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js +++ b/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js @@ -173,12 +173,13 @@ let MarketAdditionalDataForm = React.createClass({ disabled={!this.props.editable || !piece.acl.acl_edit}> {heading}