Skip to content

Commit

Permalink
Dev: added scripts for clearall button
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 17, 2017
1 parent 1cb1300 commit f1aeeca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -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']);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit f1aeeca

Please sign in to comment.