diff --git a/js/multilingual_setup.js b/js/multilingual_setup.js index cab9442..f1faeb7 100644 --- a/js/multilingual_setup.js +++ b/js/multilingual_setup.js @@ -135,16 +135,16 @@ var survey_translations = {"surveytitle":"Survey Title","surveyinstructions":"Survey Instructions","surveyacknowledgment":"Survey Response"} var others = ''; for(id in tags){ - if(tags[id].includes('@p1000lang')){ + if(tags[id].indexOf('@p1000lang') > -1){ questions = JSON.parse(tags[id].replace('@p1000lang','',tags[id])); } - else if(tags[id].includes('@p1000answers')){ + else if(tags[id].indexOf('@p1000answers') > -1){ answers = JSON.parse(tags[id].replace('@p1000answers','',tags[id])); } - else if(tags[id].includes('@p1000errors')){ + else if(tags[id].indexOf('@p1000errors') > -1){ errors = JSON.parse(tags[id].replace('@p1000errors','',tags[id])); } - else if(tags[id].includes('@p1000surveytext')){ + else if(tags[id].indexOf('@p1000surveytext') > -1){ survey_text = JSON.parse(tags[id].replace('@p1000surveytext','',tags[id])); } else{ @@ -224,10 +224,10 @@ var tags = data.split('\n'); for(id in tags){ - if(tags[id].includes('@p1000lang')){ + if(tags[id].indexOf('@p1000lang') > -1){ questions = JSON.parse(tags[id].replace('@p1000lang','',tags[id])); } - else if(tags[id].includes('@p1000answers')){ + else if(tags[id].indexOf('@p1000answers') > -1){ answers = JSON.parse(tags[id].replace('@p1000answers','',tags[id])); } } diff --git a/js/multilingual_survey_complete.js b/js/multilingual_survey_complete.js index 56502aa..8f3a63f 100644 --- a/js/multilingual_survey_complete.js +++ b/js/multilingual_survey_complete.js @@ -1,5 +1,5 @@ (function(){ - var ajax_url = 'REDCAP_AJAX_URL&NOAUTH'; + var ajax_url = 'REDCAP_AJAX_URL'; var translations = {}; var languages = {}; var lang = getCookie('p1000Lang'); @@ -85,4 +85,4 @@ return "-1"; } -})(); +})(); \ No newline at end of file