fix(web/contest/self_review): self_review limit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-10-10 17:30:01 +08:00
parent 4018227d8b
commit be876d2a1d
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -300,6 +300,10 @@
$content = DB::selectFirst("select content from contests_reviews where contest_id = {$contest['id']} and problem_id = {$contest_problems[$i]['problem_id']} and poster = '{$myUser['username']}'")['content'];
$self_reviews_update_form->addVTextArea('self_review_update__problem_' . chr(ord('A') + $i), '<b>' . chr(ord('A') + $i) . '</b>: ' . $contest_problems[$i]['problem']['title'], $content,
function ($content) {
if (strlen($content) > 200) {
return '总结不能超过200字';
}
return '';
},
null,
@ -310,6 +314,10 @@
$content = DB::selectFirst("select content from contests_reviews where contest_id = {$contest['id']} and problem_id = -1 and poster = '{$myUser['username']}'")['content'];
$self_reviews_update_form->addVTextArea('self_review_update__overall', '比赛总结', $content,
function ($content) {
if (strlen($content) > 200) {
return '总结不能超过200字';
}
return '';
},
null,