Skip to content

Commit

Permalink
Fixed issue #18837: unable to replace record during reimport of VV fi…
Browse files Browse the repository at this point in the history
…les (#3275)
  • Loading branch information
Shnoulle committed Jul 10, 2023
1 parent 431dac7 commit 6110529
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions application/views/admin/dataentry/vvimport.php
Expand Up @@ -65,7 +65,7 @@
'renumber' => gT("Renumber the new record."),
'replace' => gT("Replace the existing record."),
'replaceanswers' => gT("Replace answers in file in the existing record."),
),array('disabled'=>'disabled','class'=>'form-control'));
),array('class'=>'form-control'));
?>
</div>
</div>
Expand Down Expand Up @@ -160,15 +160,16 @@
</div></div></div>
<?php
App()->getClientScript()->registerScript('VVImportBSSwitcher', "
LS.renderBootstrapSwitch();
$('#noid').on('switchChange.bootstrapSwitch', function(event, state) {
if (!state){
$('#insertmethod').removeAttr('disabled');
$('#insertmethod-container').show('slow');
$('#insertmethod').prop('disabled', true);
$('#insertmethod-container').hide();
$('input[name=\"noid\"]').on('change', function(event) {
let state = $('input[name=\"noid\"]:checked').val();
if (!state || state == '0'){
$('#insertmethod').prop('disabled', false);
$('#insertmethod-container').show();
}else{
$('#insertmethod').attr('disabled','disabled');
$('#insertmethod-container').hide('slow');
$('#insertmethod').prop('disabled', true);
$('#insertmethod-container').hide();
}
});
", LSYii_ClientScript::POS_POSTSCRIPT);
Expand Down

0 comments on commit 6110529

Please sign in to comment.