-
+ show={true}
+ stacked={false}
+ transition={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "appear": false,
+ "in": false,
+ "mountOnEnter": false,
+ "timeout": 300,
+ "unmountOnExit": false,
+ },
+ "displayName": "Fade",
+ "render": [Function],
+ }
+ }
+ variant="danger"
+ >
+ This field is required
+
diff --git a/src/components/ListField/index.jsx b/src/components/ListField/index.jsx
index 05fab6708..afe1cfff2 100644
--- a/src/components/ListField/index.jsx
+++ b/src/components/ListField/index.jsx
@@ -3,9 +3,10 @@ import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
import Autosuggest from 'react-autosuggest';
import { push } from 'connected-react-router';
import PropTypes from 'prop-types';
+import { Alert } from '@edx/paragon';
+
import store from '../../data/store';
import sourceInfo from '../../data/actions/sourceInfo';
-import StatusAlert from '../StatusAlert';
class ListField extends React.Component {
constructor(props) {
@@ -187,10 +188,7 @@ class ListField extends React.Component {
{submitFailed && error
&& (
-
+
{error}
)}
diff --git a/src/components/RichEditor/index.jsx b/src/components/RichEditor/index.jsx
index f08eef199..4f50a749b 100644
--- a/src/components/RichEditor/index.jsx
+++ b/src/components/RichEditor/index.jsx
@@ -13,7 +13,7 @@ import '@edx/tinymce-language-selector';
import 'tinymce/skins/ui/oxide/skin.css';
import contentCss from 'tinymce/skins/content/default/content.min.css';
import contentUiCss from 'tinymce/skins/ui/oxide/content.min.css';
-import StatusAlert from '../StatusAlert';
+import { Alert } from '@edx/paragon';
class RichEditor extends React.Component {
constructor(props) {
@@ -73,10 +73,7 @@ class RichEditor extends React.Component {
{label}
{submitFailed && error
&& (
-
+ {error}
)}
{/*
We are using aria-labelledby here instead of a tag because the TinyMCE Editor
diff --git a/src/components/SidePanes/CommentsPane.jsx b/src/components/SidePanes/CommentsPane.jsx
index 029947a0b..9840871f5 100644
--- a/src/components/SidePanes/CommentsPane.jsx
+++ b/src/components/SidePanes/CommentsPane.jsx
@@ -1,13 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { Icon, TextArea } from '@edx/paragon';
+import { Icon, TextArea, Alert } from '@edx/paragon';
import { formatDate } from '../../utils/index';
import Comment from './Comment';
import FieldLabel from '../FieldLabel';
import Pane from './Pane';
-import StatusAlert from '../StatusAlert';
class CommentsPane extends React.Component {
constructor(props) {
@@ -105,11 +104,12 @@ class CommentsPane extends React.Component {
{!hasComments && !showSpinner && No comments
}
{showComments && commentThread}
{!!comments.error && (
-
+ >
+ {comments.error}
+
)}
)}
diff --git a/src/components/SidePanes/CommentsPane.test.jsx b/src/components/SidePanes/CommentsPane.test.jsx
index 8cd284a46..b39769323 100644
--- a/src/components/SidePanes/CommentsPane.test.jsx
+++ b/src/components/SidePanes/CommentsPane.test.jsx
@@ -1,9 +1,9 @@
import React from 'react';
import { shallow } from 'enzyme';
+import { Alert } from '@edx/paragon';
import Comment from './Comment';
import CommentsPane from './CommentsPane';
-import StatusAlert from '../StatusAlert';
describe('CommentsPane', () => {
const mockFetch = jest.fn();
@@ -99,7 +99,7 @@ describe('CommentsPane', () => {
const postCommentButton = wrapper.find('.btn-primary');
postCommentButton.simulate('click');
- const commentAlert = wrapper.find(StatusAlert);
+ const commentAlert = wrapper.find(Alert);
expect(commentAlert);
expect(wrapper.state().showEmptyCommentAlert).toEqual(true);
});
@@ -112,7 +112,7 @@ describe('CommentsPane', () => {
fetchComments={mockFetch}
/>);
- const commentAlert = wrapper.find(StatusAlert);
+ const commentAlert = wrapper.find(Alert);
expect(commentAlert);
});
});
diff --git a/src/components/SidePanes/UsersPane.jsx b/src/components/SidePanes/UsersPane.jsx
index ace2623c1..fcd376581 100644
--- a/src/components/SidePanes/UsersPane.jsx
+++ b/src/components/SidePanes/UsersPane.jsx
@@ -1,12 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { Icon, InputSelect } from '@edx/paragon';
+import { Icon, InputSelect, Alert } from '@edx/paragon';
import Pane from './Pane';
import User from './User';
import FieldLabel from '../FieldLabel';
-import StatusAlert from '../StatusAlert';
class UsersPane extends React.Component {
displayName(user) {
@@ -120,7 +119,7 @@ class UsersPane extends React.Component {
)}
{!showEditors && Array.isArray(organizationUsers.error) && organizationUsers.error.length
- &&
diff --git a/src/components/StafferPage/__snapshots__/StafferPage.test.jsx.snap b/src/components/StafferPage/__snapshots__/StafferPage.test.jsx.snap
index 5d49a5e94..23ccded4f 100644
--- a/src/components/StafferPage/__snapshots__/StafferPage.test.jsx.snap
+++ b/src/components/StafferPage/__snapshots__/StafferPage.test.jsx.snap
@@ -65,16 +65,31 @@ exports[`StafferPage renders html correctly when given a referrer 1`] = `
className=""
wide={false}
>
-
+ show={true}
+ stacked={false}
+ transition={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "appear": false,
+ "in": false,
+ "mountOnEnter": false,
+ "timeout": 300,
+ "unmountOnExit": false,
+ },
+ "displayName": "Fade",
+ "render": [Function],
+ }
+ }
+ variant="info"
+ >
+ The data you entered on the course edit screen is saved. You will return to that page when you have finished updating instructor information.
+
Create New Instructor
@@ -195,16 +210,47 @@ exports[`StafferPage renders page correctly while fetching 1`] = `
`;
exports[`StafferPage renders page correctly with no stafferInfo 1`] = `
-
+ show={true}
+ stacked={false}
+ title=""
+ transition={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "appear": false,
+ "in": false,
+ "mountOnEnter": false,
+ "timeout": 300,
+ "unmountOnExit": false,
+ },
+ "displayName": "Fade",
+ "render": [Function],
+ }
+ }
+ variant="danger"
+>
+
+ Could not load page
+
+
+ Could not get instructor information
+
+
`;
exports[`StafferPage renders page correctly with staffer info error 1`] = `
@@ -261,21 +307,32 @@ exports[`StafferPage renders page correctly with staffer info error 1`] = `
touchOnChange={false}
updateUnregisteredFields={false}
/>
-
,
- ]
- }
onClose={[Function]}
- title={null}
- />
+ show={true}
+ stacked={false}
+ transition={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "appear": false,
+ "in": false,
+ "mountOnEnter": false,
+ "timeout": 300,
+ "unmountOnExit": false,
+ },
+ "displayName": "Fade",
+ "render": [Function],
+ }
+ }
+ variant="danger"
+ >
+ Fail
+
+
diff --git a/src/components/StafferPage/index.jsx b/src/components/StafferPage/index.jsx
index da0ac952f..820481440 100644
--- a/src/components/StafferPage/index.jsx
+++ b/src/components/StafferPage/index.jsx
@@ -1,9 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
+import { Alert } from '@edx/paragon';
import StafferForm from './StafferForm';
-import StatusAlert from '../StatusAlert';
import LoadingSpinner from '../LoadingSpinner';
import PageContainer from '../PageContainer';
@@ -107,12 +107,15 @@ class StafferPage extends React.Component {
if (!stafferInfo) {
return (
-
+ variant="danger"
+ title=""
+ message=""
+ >
+
Could not load page
+
Could not get instructor information
+
);
}
@@ -150,12 +153,14 @@ class StafferPage extends React.Component {
{ showSpinner &&
}
{ referrer
&& (
-
+ >
+ The data you entered on the course edit screen is saved. You will return to that
+ page when you have finished updating instructor information.
+
)}
{ showForm && (
@@ -171,11 +176,12 @@ class StafferPage extends React.Component {
{...this.props}
/>
{ errorArray.length > 1 && (
-
+ variant="danger"
+ >
+ {errorArray}
+
)}
)}
diff --git a/src/components/StatusAlert/StatusAlert.test.jsx b/src/components/StatusAlert/StatusAlert.test.jsx
deleted file mode 100644
index 3f299347a..000000000
--- a/src/components/StatusAlert/StatusAlert.test.jsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from 'react';
-import { shallow } from 'enzyme';
-import { shallowToJson } from 'enzyme-to-json';
-
-import StatusAlert from './index';
-
-describe('StatusAlert', () => {
- it('shows a status alert', () => {
- const component = shallow(
);
- expect(shallowToJson(component)).toMatchSnapshot();
- });
-});
diff --git a/src/components/StatusAlert/__snapshots__/StatusAlert.test.jsx.snap b/src/components/StatusAlert/__snapshots__/StatusAlert.test.jsx.snap
deleted file mode 100644
index d6845f566..000000000
--- a/src/components/StatusAlert/__snapshots__/StatusAlert.test.jsx.snap
+++ /dev/null
@@ -1,22 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`StatusAlert shows a status alert 1`] = `
-
-
- Test Message
-
-
- }
- dismissible={false}
- onClose={[Function]}
- open={true}
-/>
-`;
diff --git a/src/components/StatusAlert/index.jsx b/src/components/StatusAlert/index.jsx
deleted file mode 100644
index faae13eb0..000000000
--- a/src/components/StatusAlert/index.jsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import React from 'react';
-import classNames from 'classnames';
-import PropTypes from 'prop-types';
-import { StatusAlert as Alert, Icon } from '@edx/paragon';
-
-const StatusAlert = (props) => {
- const {
- alertType,
- className,
- iconClassNames,
- title,
- message,
- dismissible,
- onClose,
- } = props;
-
- return (
-