From c65f08e2f5d8a443d71c37696c1e6d7992a4e83e Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 5 Feb 2023 19:17:26 +0800 Subject: [PATCH] fix(problem/manage/data/configure): default value of subtasks --- web/js/uoj.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web/js/uoj.js b/web/js/uoj.js index 8b8b2ad..ccabb32 100644 --- a/web/js/uoj.js +++ b/web/js/uoj.js @@ -1350,6 +1350,22 @@ $.fn.problem_configure_subtasks = function(problem_conf) { }); })(i); + if (problem_conf['subtask_type_' + i]) { + input_subtask_type.val(problem_conf['subtask_type_' + i]); + } + + if (problem_conf['subtask_end_' + i]) { + input_subtask_end.val(problem_conf['subtask_end_' + i]); + } + + if (problem_conf['subtask_score_' + i]) { + input_subtask_score.val(problem_conf['subtask_score_' + i]); + } + + if (problem_conf['subtask_used_time_type_' + i]) { + input_subtask_used_time_type.val(problem_conf['subtask_used_time_type_' + i]); + } + div_subtasks.append( $('
').append( $('
').text('Subtask #' + i)