Adds textfield to coral-UI.

This commit is contained in:
gaba
2017-02-13 16:51:31 -08:00
parent 1d70ae0dec
commit d4109c8fca
5 changed files with 39 additions and 4 deletions
@@ -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) {
+4 -2
View File
@@ -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í."
}
}
}
+11
View File
@@ -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;