mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 21:36:21 +00:00
fix(web/contest/self_review): self_review limit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4018227d8b
commit
be876d2a1d
@ -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'];
|
$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,
|
$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) {
|
function ($content) {
|
||||||
|
if (strlen($content) > 200) {
|
||||||
|
return '总结不能超过200字';
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
null,
|
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'];
|
$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,
|
$self_reviews_update_form->addVTextArea('self_review_update__overall', '比赛总结', $content,
|
||||||
function ($content) {
|
function ($content) {
|
||||||
|
if (strlen($content) > 200) {
|
||||||
|
return '总结不能超过200字';
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
|
Loading…
Reference in New Issue
Block a user