From 7491ac755a17bc794574a27691958b6ac1c1f7a0 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Fri, 18 Aug 2017 16:24:45 +0200 Subject: [PATCH] Dev: moved welcome classes and id definition to surveyRuntime --- application/helpers/SurveyRuntimeHelper.php | 13 +++++++++++++ application/helpers/frontend_helper.php | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/application/helpers/SurveyRuntimeHelper.php b/application/helpers/SurveyRuntimeHelper.php index 263510b64d3..103b0d74bbb 100644 --- a/application/helpers/SurveyRuntimeHelper.php +++ b/application/helpers/SurveyRuntimeHelper.php @@ -1734,8 +1734,21 @@ private function setGroup() private function setClassAndIds() { + + // Welcome + $thissurvey['id']['welcomecontainer'] = 'welcome-container'; + $thissurvey['class']['welcomecontainer'] = ''; + $thissurvey['class']['surveyname'] = "survey-name text-center"; + $thissurvey['class']['description'] = "text-info text-center survey-description"; + $thissurvey['class']['welcome'] = "survey-welcome h4 text-primary"; + $thissurvey['class']['questioncount'] = "number-of-questions text-muted"; + $thissurvey['class']['questioncounttext'] = "question-count-text"; + + // Warnings $this->aSurveyInfo['class']['activealert'] = ' alert alert-warning alert-dismissible fade in alert-dismissible '; $this->aSurveyInfo['class']['errorHtml'] = ' fade in alert-dismissible ls-questions-have-errors alert alert-danger '; + + } private function fixMaxStep() diff --git a/application/helpers/frontend_helper.php b/application/helpers/frontend_helper.php index b34e3c9ffcc..8d8a2508bbc 100644 --- a/application/helpers/frontend_helper.php +++ b/application/helpers/frontend_helper.php @@ -2093,18 +2093,6 @@ function display_first_page($thissurvey, $aSurveyInfo) LimeExpressionManager::FinishProcessingPage(); $thissurvey['surveyUrl'] = Yii::app()->getController()->createUrl("survey/index",array("sid"=>$surveyid)); // For form action (will remove newtest) - - - // Id Class and other attributes for views - $thissurvey['id']['welcomecontainer'] = 'welcome-container'; - - $thissurvey['class']['welcomecontainer'] = ''; - $thissurvey['class']['surveyname'] = "survey-name text-center"; - $thissurvey['class']['description'] = "text-info text-center survey-description"; - $thissurvey['class']['welcome'] = "survey-welcome h4 text-primary"; - $thissurvey['class']['questioncount'] = "number-of-questions text-muted"; - $thissurvey['class']['questioncounttext'] = "question-count-text"; - $thissurvey['attr']['welcomecontainer'] = $thissurvey['attr']['surveyname'] = $thissurvey['attr']['description'] = $thissurvey['attr']['welcome'] = $thissurvey['attr']['questioncount'] = '';