Skip to content

Commit

Permalink
Fixed issue #13830: Language changer broken in Ajax mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jul 6, 2018
1 parent 5eea105 commit 6ba7776
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
2 changes: 1 addition & 1 deletion assets/packages/limesurvey/survey.js
Expand Up @@ -163,7 +163,7 @@ function activateLanguageChanger(){
.val(lang)
.appendTo(limesurveyForm);
// Append move type.
$('<input type="hidden" name="move" value="changelang" />').appendTo(limesurveyForm);
$('<input type="hidden" id="onsubmitbuttoninput" name="move" value="changelang" />').appendTo(limesurveyForm);
limesurveyForm.submit();
};

Expand Down
31 changes: 0 additions & 31 deletions themes/survey/vanilla/scripts/ajaxify.js
Expand Up @@ -64,37 +64,6 @@ var AjaxSubmitObject = function () {
return true;
};

var appendScript = function (scriptText, scriptPosition, src) {
src = src || '';
scriptPosition = scriptPosition || null;
var scriptNode = document.createElement('script');
scriptNode.type = 'text/javascript';
if (src != false) {
scriptNode.src = src;
}
scriptNode.text = scriptText;
scriptNode.attributes.class = 'toRemoveOnAjax';
switch (scriptPosition) {
case 'head':
if (checkScriptNotLoaded(scriptNode)) {
document.head.appendChild(scriptNode);
}
break;
case 'body':
document.body.appendChild(scriptNode);
break;
case 'beginScripts':
document.getElementById('beginScripts').appendChild(scriptNode);
break;
case 'bottomScripts': //fallthrough
default:
document.getElementById('bottomScripts').appendChild(scriptNode);
break;

}
};


var bindActions = function () {
var logFunction = new ConsoleShim('PJAX-LOG', (LSvar.debugMode < 1));

Expand Down

0 comments on commit 6ba7776

Please sign in to comment.