File tree Expand file tree Collapse file tree
src/library-authoring/create-legacy-library Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ import { StudioFooterSlot } from '@edx/frontend-component-footer';
22import { getConfig } from '@edx/frontend-platform' ;
33import { useIntl } from '@edx/frontend-platform/i18n' ;
44import {
5+ Alert ,
56 Container ,
67 Form ,
78 Button ,
89 StatefulButton ,
910 ActionRow ,
1011} from '@openedx/paragon' ;
12+ import { Warning } from '@openedx/paragon/icons' ;
1113import { Formik } from 'formik' ;
12- import { useNavigate } from 'react-router-dom' ;
14+ import { useNavigate , Link } from 'react-router-dom' ;
1315import * as Yup from 'yup' ;
1416import classNames from 'classnames' ;
1517
@@ -100,6 +102,20 @@ export const CreateLegacyLibrary = ({
100102 title = { intl . formatMessage ( legacyMessages . createLibrary ) }
101103 />
102104 ) }
105+ < Alert variant = "warning" icon = { Warning } >
106+ < Alert . Heading > { intl . formatMessage ( legacyMessages . warningTitle ) } </ Alert . Heading >
107+ { intl . formatMessage ( legacyMessages . warningBody , {
108+ libraryLink : (
109+ < Alert . Link
110+ as = { Link }
111+ // @ts -ignore
112+ to = "/libraries"
113+ >
114+ { intl . formatMessage ( legacyMessages . warningLibraryFeature ) }
115+ </ Alert . Link >
116+ ) ,
117+ } ) }
118+ </ Alert >
103119 < Formik
104120 initialValues = { {
105121 displayName : '' ,
Original file line number Diff line number Diff line change @@ -11,6 +11,21 @@ const messages = defineMessages({
1111 defaultMessage : 'Legacy library name' ,
1212 description : 'Label for the title field when creating a legacy library.' ,
1313 } ,
14+ warningTitle : {
15+ id : 'course-authoring.library-authoring.create-legacy-library.warning.title' ,
16+ defaultMessage : 'You are creating content in a deprecated format' ,
17+ description : 'Warning to discourage users from creating a new Legacy Library' ,
18+ } ,
19+ warningBody : {
20+ id : 'course-authoring.library-authoring.create-legacy-library.warning.body' ,
21+ defaultMessage : 'Legacy libraries will be unsupported in Willow. Any content you create in a legacy library will soon need to be migrated. Consider using the {libraryLink} instead.' ,
22+ description : 'Warning to discourage users from creating a new Legacy Library' ,
23+ } ,
24+ warningLibraryFeature : {
25+ id : 'course-authoring.library-authoring.create-legacy-library.warning.library-feature' ,
26+ defaultMessage : 'Library feature' ,
27+ description : 'Link to the Libraries feature page' ,
28+ } ,
1429 createLibraryButton : {
1530 id : 'course-authoring.library-authoring.create-legacy-library.form.create-library.button' ,
1631 defaultMessage : 'Create legacy library' ,
You can’t perform that action at this time.
0 commit comments