mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
Adds textfield to coral-UI.
This commit is contained in:
@@ -35,3 +35,17 @@ p {
|
||||
.wrapper {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.configSettingQuestionBox {
|
||||
min-height: 100px;
|
||||
margin-bottom: 20px;
|
||||
cursor: pointer;
|
||||
width: auto;
|
||||
height: auto;
|
||||
text-align: left;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -60,9 +60,13 @@ export default ({handleChange, handleApply, changed, ...props}) => (
|
||||
title: lang.t('configureCommentStream.enableQuestionBox'),
|
||||
description: lang.t('configureCommentStream.enableQuestionBoxDescription')
|
||||
}} />
|
||||
<div className={styles.content}>
|
||||
<div className={`${styles.configSettingQuestionBox} ${props.questionBoxEnable ? null : styles.hidden}`} >
|
||||
Pepe
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
);
|
||||
|
||||
@@ -28,13 +28,17 @@ class ConfigureStreamContainer extends Component {
|
||||
const {elements} = e.target;
|
||||
const premod = elements.premod.checked;
|
||||
const questionBoxEnable = elements.qboxenable.checked;
|
||||
const questionBoxContent = ''; // elements.qboxcontent.value;
|
||||
|
||||
console.log('debug ', questionBoxContent);
|
||||
|
||||
// const premodLinks = elements.premodLinks.checked;
|
||||
const {changed} = this.state;
|
||||
|
||||
const newConfig = {
|
||||
moderation: premod ? 'PRE' : 'POST',
|
||||
questionBoxEnable: questionBoxEnable
|
||||
questionBoxEnable,
|
||||
questionBoxContent
|
||||
};
|
||||
|
||||
if (changed) {
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"enablePremodLinks": "Pre-Moderate Comments Containing Links",
|
||||
"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."
|
||||
"enableQuestionBoxDescription": "Commenters will see a question at the top of the comments stream.",
|
||||
"includeQuestionHere": "Include your question here."
|
||||
}
|
||||
},
|
||||
"es": {
|
||||
@@ -22,7 +23,8 @@
|
||||
"enablePremodLinks": "Pre-Moderar Commentarios que contienen Links",
|
||||
"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."
|
||||
"enableQuestionBoxDescription": "Una pregunta estara en la parte de arriba del hilo de comentarios.",
|
||||
"includeQuestionHere": "Escribir la pregunta aquí."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
import {Textfield as TextFieldMDL} from 'react-mdl';
|
||||
|
||||
const TextField = ({onChange, label, rows}) => (
|
||||
<TextFieldMDL
|
||||
onChange={onChange}
|
||||
label={label}
|
||||
rows={rows}/>
|
||||
);
|
||||
|
||||
export default TextField;
|
||||
Reference in New Issue
Block a user