Skip to content

Commit

Permalink
Dev: added aQuestion (result of qanda helper) to twig
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 11, 2017
1 parent b5afa35 commit 30662c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -453,6 +453,7 @@ public function run($surveyid,$args)


// question.twig
$thissurvey['aQuestion'] = $qa;
$question_template = file_get_contents($sTemplateViewPath.'question.twig');
// Fix old template : can we remove it ? Old template are surely already broken by another issue
if (preg_match('/\{QUESTION_ESSENTIALS\}/', $question_template) === false || preg_match('/\{QUESTION_CLASS\}/', $question_template) === false)
Expand Down
4 changes: 4 additions & 0 deletions templates/default/views/question.twig
@@ -1,4 +1,8 @@
<!-- Question -->
{#
{{ dump(aSurveyInfo.aQuestion) }}
#}

<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS} question-container row">

<!-- Question text -->
Expand Down

0 comments on commit 30662c0

Please sign in to comment.