Skip to content

Commit 6110529

Browse files
authored
Fixed issue #18837: unable to replace record during reimport of VV files (LimeSurvey#3275)
1 parent 431dac7 commit 6110529

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

application/views/admin/dataentry/vvimport.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
'renumber' => gT("Renumber the new record."),
6666
'replace' => gT("Replace the existing record."),
6767
'replaceanswers' => gT("Replace answers in file in the existing record."),
68-
),array('disabled'=>'disabled','class'=>'form-control'));
68+
),array('class'=>'form-control'));
6969
?>
7070
</div>
7171
</div>
@@ -160,15 +160,16 @@
160160
</div></div></div>
161161
<?php
162162
App()->getClientScript()->registerScript('VVImportBSSwitcher', "
163-
LS.renderBootstrapSwitch();
164-
165-
$('#noid').on('switchChange.bootstrapSwitch', function(event, state) {
166-
if (!state){
167-
$('#insertmethod').removeAttr('disabled');
168-
$('#insertmethod-container').show('slow');
163+
$('#insertmethod').prop('disabled', true);
164+
$('#insertmethod-container').hide();
165+
$('input[name=\"noid\"]').on('change', function(event) {
166+
let state = $('input[name=\"noid\"]:checked').val();
167+
if (!state || state == '0'){
168+
$('#insertmethod').prop('disabled', false);
169+
$('#insertmethod-container').show();
169170
}else{
170-
$('#insertmethod').attr('disabled','disabled');
171-
$('#insertmethod-container').hide('slow');
171+
$('#insertmethod').prop('disabled', true);
172+
$('#insertmethod-container').hide();
172173
}
173174
});
174175
", LSYii_ClientScript::POS_POSTSCRIPT);

0 commit comments

Comments
 (0)