Fix problem data bug

This commit is contained in:
cuom1999 2022-12-16 13:02:40 -06:00
parent be83844d28
commit de875bd384

View file

@ -43,6 +43,8 @@
}); });
} }
$("#id_problem-data-checker").select2();
$("#problem-type").select2();
update_select2(); update_select2();
function autofill_if_exists($select, file) { function autofill_if_exists($select, file) {
@ -289,8 +291,6 @@
outFiles.push(file); outFiles.push(file);
} }
} }
console.log(inFiles);
console.log(outFiles);
if (inFiles.length == 0) { if (inFiles.length == 0) {
alert("No input/output files. Make sure your files' suffices are .in(p)/.out"); alert("No input/output files. Make sure your files' suffices are .in(p)/.out");
return false; return false;
@ -349,6 +349,7 @@
row += 1; row += 1;
} }
} }
update_select2();
return false; return false;
}); });
@ -491,7 +492,7 @@
<td> <td>
<div> <div>
{{_('Problem type')}}: {{_('Problem type')}}:
<select id="problem-type"> <select id="problem-type" style="width: 5em">
<option value="ICPC">ICPC</option> <option value="ICPC">ICPC</option>
<option value="OI">OI</option> <option value="OI">OI</option>
</select> </select>