fixed PR #15 comments
This commit is contained in:
57
web/src/components/helper/AnswerSourceForm.js
Normal file
57
web/src/components/helper/AnswerSourceForm.js
Normal file
@@ -0,0 +1,57 @@
|
||||
import React, {Component} from 'react';
|
||||
import {Button, SelectionControlGroup} from 'react-md';
|
||||
import Modal from './Modal';
|
||||
|
||||
class AnswerSourceForm extends Component{
|
||||
|
||||
render(){
|
||||
return(
|
||||
<Modal
|
||||
title="Answer type"
|
||||
actions={[
|
||||
<Button
|
||||
flat
|
||||
swapTheming
|
||||
onClick={this.props.onClose.bind (this)}
|
||||
key="cancel"
|
||||
>
|
||||
Cancel
|
||||
</Button>,
|
||||
<Button
|
||||
flat
|
||||
primary
|
||||
swapTheming
|
||||
key="save"
|
||||
onClick={this.props.onSave.bind(this)}
|
||||
>
|
||||
Save
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
<SelectionControlGroup
|
||||
id="answer-source"
|
||||
name="answer-source"
|
||||
type="radio"
|
||||
label="Import answer from:"
|
||||
onChange={this.props.onSourceChange.bind(this)}
|
||||
controls={[
|
||||
{
|
||||
label: 'Predefined answer',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: 'WordPress titles',
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: 'WordPress latest news',
|
||||
value: '2',
|
||||
},
|
||||
]}
|
||||
defaultValue={String(this.props.answerType)}
|
||||
/>
|
||||
</Modal>);
|
||||
}
|
||||
}
|
||||
|
||||
export default AnswerSourceForm;
|
||||
Reference in New Issue
Block a user