@@ -325,7 +325,15 @@ export const huggingFaceMigrateWebView = async (buckets: string[]): Promise<stri
325
325
<br>
326
326
<label for="repoLink">Repo Link:</label>
327
327
<input type="text" id="repoLink" name="repoLink" placeholder="e.g., username/dataset_name">
328
+ <div id="trust-code-container" class="checkbox-row">
329
+ <div class="checkbox-container tooltip">
330
+ <input type="checkbox" id="trust-remote-code" name="trust-remote-code">
331
+ <label for="trust-remote-code">Trust Remote Code</label>
332
+ <span class="tooltiptext">Check to enable Trust remote code flag.</span>
333
+ </div>
334
+ </div>
328
335
<div class="form-row" id="repoInputContainer" style="display:none;">
336
+ <br>
329
337
<input type="submit" value="Load Configs" onclick="onLoadConfigsClick(event)" class="redButton">
330
338
</div>
331
339
<div id="loader" style="display: none; text-align: center; margin: 20px 0;">
@@ -337,13 +345,6 @@ export const huggingFaceMigrateWebView = async (buckets: string[]): Promise<stri
337
345
<input type="text" id="filePaths" name="filePaths" placeholder="e.g., /path/to/file1,/path/to/file2">
338
346
</div>
339
347
<br>
340
- <div class="checkbox-row">
341
- <div class="checkbox-container tooltip">
342
- <input type="checkbox" id="trust-remote-code" name="trust-remote-code" checked>
343
- <label for="trust-remote-code">Trust Remote Code</label>
344
- <span class="tooltiptext">Check to enable Trust remote code flag.</span>
345
- </div>
346
- </div>
347
348
<div class="validation-error" id="validation-error-connect"></div>
348
349
<div id="configContainer" style="display:none;">
349
350
<div class="separator-container">
@@ -408,16 +409,24 @@ export const huggingFaceMigrateWebView = async (buckets: string[]): Promise<stri
408
409
$(document).ready(function () {
409
410
// Initialize Select2 on all dropdowns
410
411
$('.js-select2').select2({ width: '100%' });
412
+ // Show repo input container by default since repo radio is checked by default
413
+ $('#repoInputContainer').show();
414
+ $('#pathInputContainer').hide();
415
+
416
+ $('#trust-code-container').insertBefore('#repoInputContainer');
411
417
// Event listener for dataMethod radio buttons
412
418
$('input[name="dataMethod"]').change(function () {
413
419
if ($('#useRepo').is(':checked')) {
414
420
$('#repoInputContainer').show(); // Show repo input
415
421
$('#pathInputContainer').hide(); // Hide path input
416
422
$('#repoLink').val(''); // Clear repo link input
423
+ $('#trust-code-container').insertBefore('#repoInputContainer');
417
424
} else if ($('#usePath').is(':checked')) {
418
425
$('#repoInputContainer').hide(); // Hide repo input
419
426
$('#pathInputContainer').show(); // Show path input
420
427
$('#filePaths').val(''); // Clear file paths input
428
+ $('#trust-code-container').insertAfter('#pathInputContainer');
429
+
421
430
}
422
431
// Hide config and splits until the configs are loaded
423
432
$('#configContainer').hide();
@@ -426,9 +435,6 @@ export const huggingFaceMigrateWebView = async (buckets: string[]): Promise<stri
426
435
$('#configs').prop('disabled', true);
427
436
$('#splits').prop('disabled', true);
428
437
});
429
- // Initially hide both input containers
430
- $('#repoInputContainer').hide();
431
- $('#pathInputContainer').hide();
432
438
});
433
439
434
440
function showLoader() {
0 commit comments