diff --git a/web/app/controllers/contest_inside.php b/web/app/controllers/contest_inside.php index 3b47fe4..e40edc0 100644 --- a/web/app/controllers/contest_inside.php +++ b/web/app/controllers/contest_inside.php @@ -55,24 +55,25 @@ isset($tabs_info[$cur_tab]) || UOJResponse::page404(); if (UOJContest::cur()->userCanStartFinalTest(Auth::user())) { if (CONTEST_PENDING_FINAL_TEST <= $contest['cur_progress']) { - $start_test_form = new UOJBs4Form('start_test'); + $start_test_form = new UOJForm('start_test'); $start_test_form->handle = function () { UOJContest::finalTest(); }; - $start_test_form->submit_button_config['class_str'] = 'btn btn-danger d-block w-100'; - $start_test_form->submit_button_config['smart_confirm'] = ''; - $start_test_form->submit_button_config['text'] = UOJContest::cur()->labelForFinalTest(); + $start_test_form->config['submit_container']['class'] = 'mt-2'; + $start_test_form->config['submit_button']['class'] = 'btn btn-danger d-block w-100'; + $start_test_form->config['submit_button']['text'] = UOJContest::cur()->labelForFinalTest(); + $start_test_form->config['confirm']['smart'] = true; $start_test_form->runAtServer(); } if ($contest['cur_progress'] >= CONTEST_TESTING) { - $publish_result_form = new UOJBs4Form('publish_result'); + $publish_result_form = new UOJForm('publish_result'); $publish_result_form->handle = function () { UOJContest::announceOfficialResults(); }; - $publish_result_form->submit_button_config['class_str'] = 'btn btn-danger d-block w-100'; - $publish_result_form->submit_button_config['smart_confirm'] = ''; - $publish_result_form->submit_button_config['text'] = '公布成绩'; - + $publish_result_form->config['submit_container']['class'] = 'mt-2'; + $publish_result_form->config['submit_button']['class'] = 'btn btn-danger d-block w-100'; + $publish_result_form->config['submit_button']['text'] = '公布成绩'; + $publish_result_form->config['confirm']['smart'] = true; $publish_result_form->runAtServer(); } }