From de86f7de164f98ef150c11813a0e7d9d8b22adf5 Mon Sep 17 00:00:00 2001 From: Idan Cohen Date: Sat, 17 Feb 2018 16:08:42 +0200 Subject: [PATCH 1/3] changes checkboxes long answers from input to textarea --- src/components/VolunteerTab/FormAnswersView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/VolunteerTab/FormAnswersView.js b/src/components/VolunteerTab/FormAnswersView.js index 6758f0ff..aad2ab74 100644 --- a/src/components/VolunteerTab/FormAnswersView.js +++ b/src/components/VolunteerTab/FormAnswersView.js @@ -23,6 +23,7 @@ export default class FromAnswersView extends Component { return (
{this.props.answers && this.props.answers.map((question, index) => +
{question.questionType === 'text' && ( From acc742dce3dab800d0d1052c9e8a936939e3b01a Mon Sep 17 00:00:00 2001 From: Idan Cohen Date: Sat, 17 Feb 2018 16:17:52 +0200 Subject: [PATCH 2/3] change checkboxes long answers from input to textarea --- .../VolunteerTab/FormAnswersView.js | 75 ++++++++++--------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/src/components/VolunteerTab/FormAnswersView.js b/src/components/VolunteerTab/FormAnswersView.js index aad2ab74..74a13e4f 100644 --- a/src/components/VolunteerTab/FormAnswersView.js +++ b/src/components/VolunteerTab/FormAnswersView.js @@ -23,42 +23,49 @@ export default class FromAnswersView extends Component { return (
{this.props.answers && this.props.answers.map((question, index) => - - -
- {question.questionType === 'text' && ( - - {question.question} - - - )} - {question.questionType === 'textarea' && ( - - {question.question} - - - )} - {question.questionType === 'checkbox' && ( - - {question.question} - - )} - {question.questionType === 'radio' && ( - - {question.question} - - - )} - {question.questionType === 'checkboxes' && ( - - {question.question} - - - )} -
-
+ this._render_question(question, index, rtl) )}
) } + + _render_question(question, index, rtl) { + const componentType = (question.answer.length > 60)? "textarea":"input"; + + return ( + +
+ {question.questionType === 'text' && ( + + {question.question} + + + )} + {question.questionType === 'textarea' && ( + + {question.question} + + + )} + {question.questionType === 'checkbox' && ( + + {question.question} + + )} + {question.questionType === 'radio' && ( + + {question.question} + + + )} + {question.questionType === 'checkboxes' && ( + + {question.question} + + + )} +
+
+ ) + } } \ No newline at end of file From f7a9e8a5402e9129dc8b517937a826413eab3064 Mon Sep 17 00:00:00 2001 From: Idan Cohen Date: Sat, 17 Feb 2018 16:19:46 +0200 Subject: [PATCH 3/3] newline at end of file --- src/components/VolunteerTab/FormAnswersView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VolunteerTab/FormAnswersView.js b/src/components/VolunteerTab/FormAnswersView.js index 74a13e4f..9e0fc62b 100644 --- a/src/components/VolunteerTab/FormAnswersView.js +++ b/src/components/VolunteerTab/FormAnswersView.js @@ -68,4 +68,4 @@ export default class FromAnswersView extends Component { ) } -} \ No newline at end of file +}