fix: license widget checkbox and link (#486)

* fix: share alike after save, license link for creative common

* test: update snapshot

---------

Co-authored-by: Kyrylo Hudym-Levkovych <kyr.hudym@kyrs-MacBook-Pro.local>
This commit is contained in:
Kyr
2024-08-16 17:19:13 +03:00
committed by GitHub
parent 940482dd9a
commit a9e8bd5558
3 changed files with 10 additions and 41 deletions

View File

@@ -123,7 +123,7 @@ export const LicenseDetails = ({
</Form.Label>
<ActionRow.Spacer />
<CheckboxControl
cchecked={details.shareAlike}
checked={details.shareAlike}
disabled={level === LicenseLevel.course}
onChange={(e) => updateField({
licenseDetails: {

View File

@@ -28,13 +28,15 @@ export const LicenseDisplay = ({
<LicenseBlurb license={license} details={details} />
<div className="x-small mt-3">{licenseDescription}</div>
</div>
<Hyperlink
className="text-primary-500 x-small"
destination="https://creativecommons.org/about"
target="_blank"
>
<FormattedMessage {...messages.viewLicenseDetailsLabel} />
</Hyperlink>
{license === LicenseTypes.creativeCommons && (
<Hyperlink
className="text-primary-500 x-small"
destination="https://creativecommons.org/about"
target="_blank"
>
<FormattedMessage {...messages.viewLicenseDetailsLabel} />
</Hyperlink>
)}
</Stack>
);
}

View File

@@ -26,17 +26,6 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with default pr
FormattedMessage component with license description
</div>
</div>
<Hyperlink
className="text-primary-500 x-small"
destination="https://creativecommons.org/about"
target="_blank"
>
<FormattedMessage
defaultMessage="View license details"
description="Label for view license details button"
id="authoring.videoeditor.license.viewLicenseDetailsLabel.label"
/>
</Hyperlink>
</Stack>
`;
@@ -66,17 +55,6 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
FormattedMessage component with license description
</div>
</div>
<Hyperlink
className="text-primary-500 x-small"
destination="https://creativecommons.org/about"
target="_blank"
>
<FormattedMessage
defaultMessage="View license details"
description="Label for view license details button"
id="authoring.videoeditor.license.viewLicenseDetailsLabel.label"
/>
</Hyperlink>
</Stack>
`;
@@ -148,16 +126,5 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
FormattedMessage component with license description
</div>
</div>
<Hyperlink
className="text-primary-500 x-small"
destination="https://creativecommons.org/about"
target="_blank"
>
<FormattedMessage
defaultMessage="View license details"
description="Label for view license details button"
id="authoring.videoeditor.license.viewLicenseDetailsLabel.label"
/>
</Hyperlink>
</Stack>
`;