|
|
|
@ -116,7 +116,7 @@ let subtaskType = {
|
|
|
|
|
</div> |
|
|
|
|
<% } %> |
|
|
|
|
<div class="field"> |
|
|
|
|
<label for="testdata">更新测试数据</label> |
|
|
|
|
<label for="testdata"><% if (!problem.testdata_id) { %>上传测试数据<% } else { %>更新测试数据<% } %></label> |
|
|
|
|
<input type="file" id="testdata" name="testdata"> |
|
|
|
|
</div> |
|
|
|
|
<button type="submit" class="ui button">提交</button> |
|
|
|
@ -134,5 +134,18 @@ function goDisable() {
|
|
|
|
|
document.getElementById('file-io-input-name').disabled = true; |
|
|
|
|
document.getElementById('file-io-output-name').disabled = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(document).ready(function () { |
|
|
|
|
$('#file-io-input-name').on('input keyup change', function (e) { |
|
|
|
|
var prob = $('#file-io-input-name').val(); |
|
|
|
|
if (prob.lastIndexOf('.') !== -1) prob = prob.substring(0, prob.lastIndexOf('.')); |
|
|
|
|
$('#file-io-output-name').attr('placeholder', prob + '.out'); |
|
|
|
|
}); |
|
|
|
|
$('#file-io-output-name').focus(function (e) { |
|
|
|
|
if (!$('#file-io-output-name').val()) { |
|
|
|
|
$('#file-io-output-name').val($('#file-io-output-name').attr('placeholder')); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
<% include footer %> |
|
|
|
|