diff --git a/client/src/app/admin/panel/articles/admin-panel-view-article.js b/client/src/app/admin/panel/articles/admin-panel-view-article.js index 11d03add..6795d926 100644 --- a/client/src/app/admin/panel/articles/admin-panel-view-article.js +++ b/client/src/app/admin/panel/articles/admin-panel-view-article.js @@ -18,6 +18,7 @@ import Form from 'core-components/form'; import FormField from 'core-components/form-field'; import SubmitButton from 'core-components/submit-button'; import TextEditor from 'core-components/text-editor'; +import Message from 'core-components/message'; class AdminPanelViewArticle extends React.Component { @@ -33,7 +34,8 @@ class AdminPanelViewArticle extends React.Component { }; state = { - editable: false + editable: false, + errorMessage: false }; componentDidMount() { @@ -96,6 +98,7 @@ class AdminPanelViewArticle extends React.Component { {i18n('SAVE')} + {this.state.errorMessage ? {i18n(this.state.errorMessage)} : null} @@ -139,7 +142,12 @@ class AdminPanelViewArticle extends React.Component { }).then(() => { this.props.dispatch(ArticlesActions.retrieveArticles()); this.setState({ - editable: false + editable: false, + errorMessage: false + }) + }).catch((e) => { + this.setState({ + errorMessage: e.message }); }); }