1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

Merge pull request #65 from ascribe/AD-1490-hide-download-button-on-thumbnails-during-registration

Hide download button on the marketplace additional data form's thumbnail image during registration
This commit is contained in:
Brett Sun 2016-01-19 15:29:34 +01:00
commit c27a0ab607
2 changed files with 10 additions and 7 deletions

View File

@ -23,11 +23,13 @@ let FurtherDetailsFileuploader = React.createClass({
onValidationFailed: React.PropTypes.func, onValidationFailed: React.PropTypes.func,
isReadyForFormSubmission: React.PropTypes.func, isReadyForFormSubmission: React.PropTypes.func,
editable: React.PropTypes.bool, editable: React.PropTypes.bool,
multiple: React.PropTypes.bool multiple: React.PropTypes.bool,
areAssetsDownloadable: React.PropTypes.bool
}, },
getDefaultProps() { getDefaultProps() {
return { return {
areAssetsDownloadable: true,
label: getLangText('Additional files'), label: getLangText('Additional files'),
multiple: false multiple: false
}; };
@ -91,7 +93,7 @@ let FurtherDetailsFileuploader = React.createClass({
'X-CSRFToken': getCookie(AppConstants.csrftoken) 'X-CSRFToken': getCookie(AppConstants.csrftoken)
} }
}} }}
areAssetsDownloadable={true} areAssetsDownloadable={this.props.areAssetsDownloadable}
areAssetsEditable={this.props.editable} areAssetsEditable={this.props.editable}
multiple={this.props.multiple} /> multiple={this.props.multiple} />
</Property> </Property>

View File

@ -163,13 +163,14 @@ let MarketAdditionalDataForm = React.createClass({
disabled={!this.props.editable}> disabled={!this.props.editable}>
{heading} {heading}
<FurtherDetailsFileuploader <FurtherDetailsFileuploader
label={getLangText('Marketplace Thumbnail Image')} areAssetsDownloadable={!!isInline}
submitFile={function () {}} editable={editable}
setIsUploadReady={this.setIsUploadReady}
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile} isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}
pieceId={pieceId} label={getLangText('Marketplace Thumbnail Image')}
otherData={otherData} otherData={otherData}
editable={editable} /> pieceId={pieceId}
setIsUploadReady={this.setIsUploadReady}
submitFile={function () {}} />
<Property <Property
name='artist_bio' name='artist_bio'
label={getLangText('Artist Bio')} label={getLangText('Artist Bio')}