Skip to content

Commit a9e8bd5

Browse files
khudymKyrylo Hudym-Levkovych
andauthored
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 <[email protected]>
1 parent 940482d commit a9e8bd5

File tree

3 files changed

+10
-41
lines changed

3 files changed

+10
-41
lines changed

src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseDetails.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export const LicenseDetails = ({
123123
</Form.Label>
124124
<ActionRow.Spacer />
125125
<CheckboxControl
126-
cchecked={details.shareAlike}
126+
checked={details.shareAlike}
127127
disabled={level === LicenseLevel.course}
128128
onChange={(e) => updateField({
129129
licenseDetails: {

src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseDisplay.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ export const LicenseDisplay = ({
2828
<LicenseBlurb license={license} details={details} />
2929
<div className="x-small mt-3">{licenseDescription}</div>
3030
</div>
31-
<Hyperlink
32-
className="text-primary-500 x-small"
33-
destination="https://creativecommons.org/about"
34-
target="_blank"
35-
>
36-
<FormattedMessage {...messages.viewLicenseDetailsLabel} />
37-
</Hyperlink>
31+
{license === LicenseTypes.creativeCommons && (
32+
<Hyperlink
33+
className="text-primary-500 x-small"
34+
destination="https://creativecommons.org/about"
35+
target="_blank"
36+
>
37+
<FormattedMessage {...messages.viewLicenseDetailsLabel} />
38+
</Hyperlink>
39+
)}
3840
</Stack>
3941
);
4042
}

src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDisplay.test.jsx.snap

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,6 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with default pr
2626
FormattedMessage component with license description
2727
</div>
2828
</div>
29-
<Hyperlink
30-
className="text-primary-500 x-small"
31-
destination="https://creativecommons.org/about"
32-
target="_blank"
33-
>
34-
<FormattedMessage
35-
defaultMessage="View license details"
36-
description="Label for view license details button"
37-
id="authoring.videoeditor.license.viewLicenseDetailsLabel.label"
38-
/>
39-
</Hyperlink>
4029
</Stack>
4130
`;
4231

@@ -66,17 +55,6 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
6655
FormattedMessage component with license description
6756
</div>
6857
</div>
69-
<Hyperlink
70-
className="text-primary-500 x-small"
71-
destination="https://creativecommons.org/about"
72-
target="_blank"
73-
>
74-
<FormattedMessage
75-
defaultMessage="View license details"
76-
description="Label for view license details button"
77-
id="authoring.videoeditor.license.viewLicenseDetailsLabel.label"
78-
/>
79-
</Hyperlink>
8058
</Stack>
8159
`;
8260

@@ -148,16 +126,5 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
148126
FormattedMessage component with license description
149127
</div>
150128
</div>
151-
<Hyperlink
152-
className="text-primary-500 x-small"
153-
destination="https://creativecommons.org/about"
154-
target="_blank"
155-
>
156-
<FormattedMessage
157-
defaultMessage="View license details"
158-
description="Label for view license details button"
159-
id="authoring.videoeditor.license.viewLicenseDetailsLabel.label"
160-
/>
161-
</Hyperlink>
162129
</Stack>
163130
`;

0 commit comments

Comments
 (0)