|
65 | 65 | 'renumber' => gT("Renumber the new record."), |
66 | 66 | 'replace' => gT("Replace the existing record."), |
67 | 67 | 'replaceanswers' => gT("Replace answers in file in the existing record."), |
68 | | - ),array('disabled'=>'disabled','class'=>'form-control')); |
| 68 | + ),array('class'=>'form-control')); |
69 | 69 | ?> |
70 | 70 | </div> |
71 | 71 | </div> |
|
160 | 160 | </div></div></div> |
161 | 161 | <?php |
162 | 162 | 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(); |
169 | 170 | }else{ |
170 | | - $('#insertmethod').attr('disabled','disabled'); |
171 | | - $('#insertmethod-container').hide('slow'); |
| 171 | + $('#insertmethod').prop('disabled', true); |
| 172 | + $('#insertmethod-container').hide(); |
172 | 173 | } |
173 | 174 | }); |
174 | 175 | ", LSYii_ClientScript::POS_POSTSCRIPT); |
|
0 commit comments