Skip to content

Commit

Permalink
fix: license widget checkbox and link (#486)
Browse files Browse the repository at this point in the history
* fix: share alike after save, license link for creative common

* test: update snapshot

---------

Co-authored-by: Kyrylo Hudym-Levkovych <[email protected]>
  • Loading branch information
khudym and Kyrylo Hudym-Levkovych authored Aug 16, 2024
1 parent 940482d commit a9e8bd5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
`;

Expand Down Expand Up @@ -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>
`;

Expand Down Expand Up @@ -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>
`;

0 comments on commit a9e8bd5

Please sign in to comment.