Skip to content

Commit 6cbc493

Browse files
committed
2 parents 25e2af4 + 311ab5c commit 6cbc493

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

js/multilingual_survey.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -630,12 +630,16 @@ var Multilingual = (function(){
630630
for(id2 in translations['answers'][id]['text']){
631631
$('.ec').each(function(){
632632
var tmp = $(this).parent().attr('comps').split(',');
633-
$(this).show();
633+
if($(this).parent().parent().hasClass('enhancedchoice')) {
634+
$(this).parent().show();
635+
}
634636
if(tmp[0] == id && tmp[2] == id2) {
635637
$(this).html(' ' + translations['answers'][id]['text'][id2]);
636638
$(this).data('lang', lang);
637639
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
638-
$(this).hide();
640+
if($(this).parent().parent().hasClass('enhancedchoice')) {
641+
$(this).parent().hide();
642+
}
639643
}
640644
});
641645
}
@@ -644,7 +648,10 @@ var Multilingual = (function(){
644648
var id2;
645649
for(id2 in translations['answers'][id]['text']){
646650
$('#'+id+'-tr .choicevert').each(function(){
647-
//$(this).show();
651+
if(!$(this).hasClass('hidden')) {
652+
$(this).show();
653+
}
654+
648655
if($(this).find('[name="__chk__' + id + '_RC_' + id2 + '"]').length) {
649656
$(this).contents().last().html(' ' + translations['answers'][id]['text'][id2]);
650657
$(this).data('lang', lang);
@@ -657,12 +664,19 @@ var Multilingual = (function(){
657664
for(id2 in translations['answers'][id]['text']){
658665
$('.ec').each(function(){
659666
var tmp = $(this).parent().attr('comps').split(',');
660-
//$(this).show();
667+
668+
if($(this).parent().parent().hasClass('enhancedchoice')) {
669+
$(this).parent().show();
670+
}
671+
// console.log($(this).parent());
672+
661673
if(tmp[0] == id && tmp[2] == id2) {
662674
$(this).html(translations['answers'][id]['text'][id2]);
663675
$(this).data('lang', lang);
664676
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
665-
$(this).hide();
677+
if($(this).parent().parent().hasClass('enhancedchoice')) {
678+
$(this).parent().hide();
679+
}
666680
}
667681
});
668682
}

multilingualPDF.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ function getName($n) {
9090

9191
//save metadata to file
9292
file_put_contents(APP_PATH_DOCROOT."PDF".DS."$random.json", json_encode($metadata));
93-
chmod(775, APP_PATH_DOCROOT."PDF".DS."$random.php");
9493

9594
//split up PDF/index.php file and add details
9695
$pdfFile = file_get_contents(APP_PATH_DOCROOT."PDF".DS."index.php");
@@ -123,4 +122,4 @@ function getName($n) {
123122
chmod(775, APP_PATH_DOCROOT."PDF".DS."index_multilingual_$random.php");
124123

125124
header('Location:' . APP_PATH_WEBROOT . "PDF" . DS . "index_multilingual_$random.php?pid=" . $_GET['pid'] . (isset($_GET['form']) ? "&page=" . $_GET['form'] : '') . "&id=" . $_GET['id'] . (isset($_GET['event_id']) ? "&event_id=" . $_GET['event_id'] : '') . (isset($_GET['instance']) && $_GET['instance'] > 1 ? "&instance=" . $_GET['instance'] : ''));
126-
?>
125+
?>

0 commit comments

Comments
 (0)