Do not reset description field while uploading thumbnail in playlist edit/publish form; use same upload thumbnail layout as file upload for playlist edit/publish.

This commit is contained in:
Franco Montenegro 2022-04-26 08:52:48 -03:00 committed by jessopb
parent 562e154675
commit 34ea712874
2 changed files with 4 additions and 1 deletions

View file

@ -362,6 +362,7 @@ function CollectionForm(props: Props) {
thumbnailParamError={thumbError} thumbnailParamError={thumbError}
thumbnailParamStatus={thumbStatus} thumbnailParamStatus={thumbStatus}
updateThumbnailParams={handleUpdateThumbnail} updateThumbnailParams={handleUpdateThumbnail}
usePublishFormMode
/> />
</fieldset-section> </fieldset-section>
<FormField <FormField

View file

@ -26,6 +26,7 @@ type Props = {
updatePublishForm: ({}) => void, updatePublishForm: ({}) => void,
updateThumbnailParams: ({}) => void, updateThumbnailParams: ({}) => void,
resetThumbnailStatus: () => void, resetThumbnailStatus: () => void,
usePublishFormMode: boolean,
}; };
function SelectThumbnail(props: Props) { function SelectThumbnail(props: Props) {
@ -42,9 +43,10 @@ function SelectThumbnail(props: Props) {
updateThumbnailParams, updateThumbnailParams,
thumbnailPath, thumbnailPath,
resetThumbnailStatus, resetThumbnailStatus,
usePublishFormMode,
} = props; } = props;
const publishForm = !updateThumbnailParams; const publishForm = usePublishFormMode || !updateThumbnailParams;
const thumbnail = publishForm ? props.thumbnail : thumbnailParam; const thumbnail = publishForm ? props.thumbnail : thumbnailParam;
const thumbnailError = publishForm ? props.thumbnailError : props.thumbnailParamError; const thumbnailError = publishForm ? props.thumbnailError : props.thumbnailParamError;