fix: Allow duplicating a draft as a published doc
This commit is contained in:
@@ -64,26 +64,30 @@ function DuplicateDialog({ document, onSubmit }: Props) {
|
|||||||
maxLength={DocumentValidation.maxTitleLength}
|
maxLength={DocumentValidation.maxTitleLength}
|
||||||
defaultValue={defaultTitle}
|
defaultValue={defaultTitle}
|
||||||
/>
|
/>
|
||||||
{document.publishedAt && !document.isTemplate && (
|
{!document.isTemplate && (
|
||||||
<>
|
<>
|
||||||
<Text size="small">
|
{document.collectionId && (
|
||||||
<Switch
|
<Text size="small">
|
||||||
name="publish"
|
<Switch
|
||||||
label={t("Published")}
|
name="publish"
|
||||||
labelPosition="right"
|
label={t("Published")}
|
||||||
checked={publish}
|
labelPosition="right"
|
||||||
onChange={handlePublishChange}
|
checked={publish}
|
||||||
/>
|
onChange={handlePublishChange}
|
||||||
</Text>
|
/>
|
||||||
<Text size="small">
|
</Text>
|
||||||
<Switch
|
)}
|
||||||
name="recursive"
|
{document.publishedAt && (
|
||||||
label={t("Include nested documents")}
|
<Text size="small">
|
||||||
labelPosition="right"
|
<Switch
|
||||||
checked={recursive}
|
name="recursive"
|
||||||
onChange={handleRecursiveChange}
|
label={t("Include nested documents")}
|
||||||
/>
|
labelPosition="right"
|
||||||
</Text>
|
checked={recursive}
|
||||||
|
onChange={handleRecursiveChange}
|
||||||
|
/>
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</ConfirmationDialog>
|
</ConfirmationDialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user