Skip to content

Commit

Permalink
Fixed issue #14282: Language of Survey is set to default in token form
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Nov 25, 2018
1 parent 515332e commit b041f3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/helpers/frontend_helper.php
Expand Up @@ -1301,7 +1301,9 @@ function renderRenderWayForm($renderWay, array $scenarios, $sTemplateViewPath, $
Yii::app()->getController()->createAction('captcha');
}
$oSurvey = Survey::model()->findByPk($surveyid);

if(empty($aSurveyInfo)) {
$aSurveyInfo = getsurveyinfo($surveyid,App()->getLanguage());
}
// Rendering layout_user_forms.twig
$thissurvey = $oSurvey->attributes;
$thissurvey["aForm"] = $aForm;
Expand All @@ -1318,7 +1320,6 @@ function renderRenderWayForm($renderWay, array $scenarios, $sTemplateViewPath, $

$aData['aSurveyInfo'] = $thissurvey;

$aSurveyInfo = getsurveyinfo($surveyid);
$aData['aSurveyInfo'] = array_merge($aSurveyInfo, $aData['aSurveyInfo']);

Yii::app()->twigRenderer->renderTemplateFromFile("layout_user_forms.twig", $aData, false);
Expand Down

0 comments on commit b041f3c

Please sign in to comment.