From f1aeeca35e8afb76e579b8099e56d84abe8d7e37 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 17 Jan 2017 12:45:54 +0100 Subject: [PATCH] Dev: added scripts for clearall button --- application/helpers/SurveyRuntimeHelper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/helpers/SurveyRuntimeHelper.php b/application/helpers/SurveyRuntimeHelper.php index 7ea162fdda3..6327c30dcb8 100644 --- a/application/helpers/SurveyRuntimeHelper.php +++ b/application/helpers/SurveyRuntimeHelper.php @@ -585,7 +585,7 @@ public function run($surveyid,$args) if($thissurvey['allowsave'] == "Y"){ App()->getClientScript()->registerScript("activateActionLink","activateActionLink();\n",CClientScript::POS_END); - + // Fill some test here, more clear .... $bTokenanswerspersistence = $thissurvey['tokenanswerspersistence'] == 'Y' && tableExists('tokens_'.$surveyid); $bAlreadySaved = isset($_SESSION['survey_'.$surveyid]['scid']); @@ -621,6 +621,11 @@ public function run($surveyid,$args) } } + // For clear all + App()->getClientScript()->registerScript("activateConfirmLanguage","$.extend(LSvar.lang,".ls_json_encode(array('yes'=>gT("Yes"),'no'=>gT("No"))).")",CClientScript::POS_BEGIN); + App()->getClientScript()->registerScript("activateActionLink","activateActionLink();\n",CClientScript::POS_END); + App()->getClientScript()->registerScript("activateConfirmButton","activateConfirmButton();\n",CClientScript::POS_END); + $redata = compact(array_keys(get_defined_vars())); echo templatereplace(file_get_contents($sTemplateViewPath."startpage.twig"), array(), $redata);