diff --git a/client/coral-admin/src/containers/Configure/CommentSettings.js b/client/coral-admin/src/containers/Configure/CommentSettings.js
new file mode 100644
index 000000000..c6a53adbe
--- /dev/null
+++ b/client/coral-admin/src/containers/Configure/CommentSettings.js
@@ -0,0 +1,65 @@
+import React from 'react';
+import I18n from 'coral-framework/modules/i18n/i18n';
+import translations from '../../translations.json';
+import styles from './Configure.css';
+import {
+ List,
+ ListItem,
+ ListItemContent,
+ ListItemAction,
+ Textfield,
+ Checkbox
+} from 'react-mdl';
+import {updateSettings} from '../../actions/settings';
+
+const updateModeration = (props) => () => {
+ const moderation = props.settings.moderation === 'pre' ? 'post' : 'pre';
+ props.dispatch(updateSettings({moderation}));
+};
+
+const updateInfoBoxEnable = (props) => () => {
+ const infoBoxEnable = !props.settings.infoBoxEnable;
+ props.dispatch(updateSettings({infoBoxEnable}));
+};
+
+const updateInfoBoxContent = (props) => (event) => {
+ const infoBoxContent = event.target.value;
+ props.dispatch(updateSettings({infoBoxContent}));
+};
+
+const StateLess = (props) =>
+ {lang.t('configure.include-comment-stream-desc')}
+
- {lang.t('configure.include-comment-stream-desc')}
-
+
;
+
+export default StateLess;
+
+const lang = new I18n(translations);
diff --git a/client/coral-admin/src/containers/Configure/Configure.js b/client/coral-admin/src/containers/Configure/Configure.js
index 93935a630..4ff268c78 100644
--- a/client/coral-admin/src/containers/Configure/Configure.js
+++ b/client/coral-admin/src/containers/Configure/Configure.js
@@ -5,30 +5,20 @@ import {
List,
ListItem,
ListItemContent,
- ListItemAction,
- Textfield,
- Checkbox,
Button,
Icon
} from 'react-mdl';
import styles from './Configure.css';
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../../translations.json';
+import EmbedLink from './EmbedLink';
+import CommentSettings from './CommentSettings';
class Configure extends React.Component {
constructor (props) {
super(props);
- this.state = {activeSection: 'comments', copied: false};
-
- this.copyToClipBoard = this.copyToClipBoard.bind(this);
-
- // Update settings
- this.updateModeration = this.updateModeration.bind(this);
- // InfoBox has two settings. Enable or not and the content of it if it is enable.
- this.updateInfoBoxEnable = this.updateInfoBoxEnable.bind(this);
- this.updateInfoBoxContent = this.updateInfoBoxContent.bind(this);
-
+ this.state = {activeSection: 'comments'};
this.saveSettings = this.saveSettings.bind(this);
}
@@ -36,95 +26,37 @@ class Configure extends React.Component {
this.props.dispatch(fetchSettings());
}
- updateModeration () {
- const moderation = this.props.settings.moderation === 'pre' ? 'post' : 'pre';
- this.props.dispatch(updateSettings({moderation}));
- }
-
- updateInfoBoxEnable () {
- const infoBoxEnable = !this.props.settings.infoBoxEnable;
- this.props.dispatch(updateSettings({infoBoxEnable}));
- }
-
- updateInfoBoxContent (event) {
- const infoBoxContent = event.target.value;
- this.props.dispatch(updateSettings({infoBoxContent}));
- }
-
saveSettings () {
this.props.dispatch(saveSettingsToServer());
}
- getCommentSettings () {
- return
-
;
- }
-
- copyToClipBoard () {
- const copyTextarea = document.querySelector(`.${ styles.embedInput}`);
- copyTextarea.select();
-
- try {
- document.execCommand('copy');
- this.setState({copied: true});
- } catch (err) {
- console.error('Unable to copy', err);
- }
- }
-
- getEmbed () {
- const embedText = `
{lang.t('configure.copy-and-paste')}
-{lang.t('configure.copy-and-paste')}
+Comments which contain these words or phrases, not seperated by commas and not + case sensitive, will be automatically removed from the comment stream.
+