Skip to content

Commit

Permalink
Closed source hidden fields
Browse files Browse the repository at this point in the history
  • Loading branch information
CWestICL committed Aug 8, 2023
1 parent bc1f521 commit 1463ad7
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ export default function SoftwareInformationForm({editSoftware}: SoftwareInformat
// console.log('formData...', formData)
// console.groupEnd()

let repoURL, citationField
repoURL = citationField = <></>

if (formData.closed_source){
repoURL = <></>
citationField = <></>
}
else {
repoURL = <AutosaveRepositoryUrl />
citationField = <AutosaveConceptDoi />
}

return (
<FormProvider {...methods}>
<form
Expand Down Expand Up @@ -134,7 +146,7 @@ export default function SoftwareInformationForm({editSoftware}: SoftwareInformat
rules={config.get_started_url.validation}
/>
<div className="py-2"></div>
<AutosaveRepositoryUrl />
{repoURL}
<div className="py-2"></div>
<AutosaveSoftwareMarkdown />
{/* add white space at the bottom */}
Expand All @@ -143,7 +155,7 @@ export default function SoftwareInformationForm({editSoftware}: SoftwareInformat
<div className="py-4 min-w-[21rem] xl:my-0">
<AutosaveSoftwarePageStatus />
<div className="py-4"></div>
<AutosaveConceptDoi />
{citationField}
<div className="py-4"></div>
<AutosaveSoftwareLogo />
<div className="py-4"></div>
Expand Down

0 comments on commit 1463ad7

Please sign in to comment.