mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
Adds question enable checkbox.
This commit is contained in:
@@ -49,6 +49,18 @@ export default ({handleChange, handleApply, changed, ...props}) => (
|
||||
</ul>
|
||||
*/}
|
||||
</li>
|
||||
<li>
|
||||
<Checkbox
|
||||
className={styles.checkbox}
|
||||
cStyle={changed ? 'green' : 'darkGrey'}
|
||||
name="qboxenable"
|
||||
onChange={handleChange}
|
||||
defaultChecked={props.questionBoxEnable}
|
||||
info={{
|
||||
title: lang.t('configureCommentStream.enableQuestionBox'),
|
||||
description: lang.t('configureCommentStream.enableQuestionBoxDescription')
|
||||
}} />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -27,12 +27,14 @@ class ConfigureStreamContainer extends Component {
|
||||
e.preventDefault();
|
||||
const {elements} = e.target;
|
||||
const premod = elements.premod.checked;
|
||||
const questionBoxEnable = elements.qboxenable.checked;
|
||||
|
||||
// const premodLinks = elements.premodLinks.checked;
|
||||
const {changed} = this.state;
|
||||
|
||||
const newConfig = {
|
||||
moderation: premod ? 'PRE' : 'POST'
|
||||
moderation: premod ? 'PRE' : 'POST',
|
||||
questionBoxEnable: questionBoxEnable
|
||||
};
|
||||
|
||||
if (changed) {
|
||||
@@ -66,6 +68,8 @@ class ConfigureStreamContainer extends Component {
|
||||
render () {
|
||||
const status = this.props.asset.closedAt === null ? 'open' : 'closed';
|
||||
const premod = this.props.asset.settings.moderation === 'PRE';
|
||||
const questionBoxEnable = this.props.asset.settings.questionBoxEnable;
|
||||
const questionBoxContent = this.props.asset.settings.questionBoxContent;
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -75,6 +79,8 @@ class ConfigureStreamContainer extends Component {
|
||||
changed={this.state.changed}
|
||||
premodLinks={false}
|
||||
premod={premod}
|
||||
questionBoxEnable={questionBoxEnable}
|
||||
questionBoxContent={questionBoxContent}
|
||||
/>
|
||||
<hr />
|
||||
<h3>{status === 'open' ? 'Close' : 'Open'} Comment Stream</h3>
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
"enablePremod": "Enable Premoderation",
|
||||
"enablePremodDescription": "Moderators must approve any comment before its published.",
|
||||
"enablePremodLinks": "Pre-Moderate Comments Containing Links",
|
||||
"enablePremodLinksDescription": "Moderators must approve any comment containing a link before its published."
|
||||
"enablePremodLinksDescription": "Moderators must approve any comment containing a link before its published.",
|
||||
"enableQuestionBox": "Enable Question Box",
|
||||
"enableQuestionBoxDescription": "Commenters will see the next question at the top of the comments stream."
|
||||
}
|
||||
},
|
||||
"es": {
|
||||
@@ -18,7 +20,9 @@
|
||||
"enablePremod": "Activar Pre Moderación",
|
||||
"enablePremodDescription": "Los Moderadores deben aprobar cualquier comentario antes de su publicación",
|
||||
"enablePremodLinks": "Pre-Moderar Commentarios que contienen Links",
|
||||
"enablePremodLinksDescription": "Los Moderadores deben probar cualquier comentario que contengan links antes de su publicación."
|
||||
"enablePremodLinksDescription": "Los Moderadores deben probar cualquier comentario que contengan links antes de su publicación.",
|
||||
"enableQuestionBox": "Activar Caja de Pregunta",
|
||||
"enableQuestionBoxDescription": "La siguiente pregunta estara en la parte de arriba del hilo de comentarios."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user