diff --git a/source/components/conversation/Conversation.js b/source/components/conversation/Conversation.js
index b7b2a82b7..b232b71f6 100644
--- a/source/components/conversation/Conversation.js
+++ b/source/components/conversation/Conversation.js
@@ -18,7 +18,6 @@ import './conversation.css'
})
@translate()
@connect(state => ({
- targetNames: state.targetNames,
conversationStarted: state.conversationStarted,
themeColours: state.themeColours,
flatRules: flatRulesSelector(state),
@@ -26,7 +25,7 @@ import './conversation.css'
}))
export default class Conversation extends Component {
render() {
- let { currentQuestion, flatRules, targetNames } = this.props
+ let { currentQuestion, flatRules } = this.props
return (
@@ -34,7 +33,7 @@ export default class Conversation extends Component {
{currentQuestion && (
- {getInputComponent(flatRules, targetNames)(currentQuestion)}
+ {getInputComponent(flatRules)(currentQuestion)}
)}
diff --git a/source/components/rule/Rule.js b/source/components/rule/Rule.js
index 5bf19e878..6979be568 100644
--- a/source/components/rule/Rule.js
+++ b/source/components/rule/Rule.js
@@ -1,4 +1,5 @@
import withColours from 'Components/utils/withColours'
+import { getInputComponent } from 'Engine/generateQuestions'
import { createMarkdownDiv } from 'Engine/marked'
import {
encodeRuleName,
@@ -22,6 +23,7 @@ import Examples from './Examples'
import RuleHeader from './Header'
import References from './References'
import './Rule.css'
+import { reduxForm } from 'redux-form'
@connect((state, props) => ({
currentExample: state.currentExample,
@@ -69,6 +71,7 @@ export default class Rule extends Component {
/>
+ {flatRule.question && }
{flatRule.ns && (
(
)
+
+@reduxForm({
+ form: 'conversation',
+ destroyOnUnmount: false
+})
+class UserInput extends Component {
+ render() {
+ let { flatRules, dottedName } = this.props
+ return getInputComponent(flatRules)(dottedName)
+ }
+}