Hide thumbnail creation for marketplace white labels

Thumbnails and marketplace images might become confusing to the user if
they are both available. In the future, we may want to change the
marketplace image to just be the thumbnail image.
This commit is contained in:
Brett Sun 2015-12-07 17:24:13 +01:00
parent e0a258262b
commit 7fdd534bc8
3 changed files with 6 additions and 10 deletions

View File

@ -28,6 +28,7 @@ let RegisterPieceForm = React.createClass({
isFineUploaderActive: React.PropTypes.bool,
isFineUploaderEditable: React.PropTypes.bool,
enableLocalHashing: React.PropTypes.bool,
enableSeparateThumbnail: React.PropTypes.bool,
// For this form to work with SlideContainer, we sometimes have to disable it
disabled: React.PropTypes.bool,
@ -42,7 +43,8 @@ let RegisterPieceForm = React.createClass({
return {
headerMessage: getLangText('Register your work'),
submitMessage: getLangText('Register work'),
enableLocalHashing: true
enableLocalHashing: true,
enableSeparateThumbnail: true
};
},
@ -108,9 +110,10 @@ let RegisterPieceForm = React.createClass({
},
isThumbnailDialogExpanded() {
const { enableSeparateThumbnail } = this.props;
const { digitalWorkFile } = this.state;
if(digitalWorkFile) {
if(digitalWorkFile && enableSeparateThumbnail) {
const { type: mimeType } = digitalWorkFile;
const mimeSubType = mimeType && mimeType.split('/').length ? mimeType.split('/')[1]
: 'unknown';

View File

@ -119,12 +119,6 @@ let MarketAdditionalDataForm = React.createClass({
GlobalNotificationActions.appendGlobalNotification(notification);
},
uploadStarted() {
this.setState({
isUploadReady: false
});
},
setIsUploadReady(isReady) {
this.setState({
isUploadReady: isReady
@ -180,7 +174,6 @@ let MarketAdditionalDataForm = React.createClass({
{heading}
<FurtherDetailsFileuploader
label={getLangText('Marketplace Thumbnail Image')}
uploadStarted={this.uploadStarted}
submitFile={function () {}}
setIsUploadReady={this.setIsUploadReady}
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}

View File

@ -115,7 +115,6 @@ let MarketRegisterPiece = React.createClass({
render() {
const {
isFineUploaderActive,
step,
whitelabel: {
name: whitelabelName = 'Market'
@ -141,6 +140,7 @@ let MarketRegisterPiece = React.createClass({
headerMessage={getLangText('Consign to %s', whitelabelName)}
submitMessage={getLangText('Proceed to additional details')}
isFineUploaderActive={true}
enableSeparateThumbnail={false}
handleSuccess={this.handleRegisterSuccess}
location={this.props.location}>
<Property