Skip to content

Commit fac33fd

Browse files
committed
Allow changing contest scoreboard type in the UI.
1 parent fc07d9d commit fac33fd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

webapp/src/Form/Type/ContestType.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Entity\Contest;
66
use App\Entity\ContestProblem;
77
use App\Entity\Language;
8+
use App\Entity\ScoreboardType;
89
use App\Entity\Team;
910
use App\Entity\TeamCategory;
1011
use App\Service\DOMJudgeService;
@@ -76,6 +77,14 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
7677
'required' => false,
7778
'help' => 'Time when the contest and scoreboard are hidden again. Usually a few hours/days after the contest ends.',
7879
]);
80+
$builder->add('scoreboardType', ChoiceType::class, [
81+
'label' => 'Scoreboard type',
82+
'choices' => [
83+
'pass-fail' => ScoreboardType::PASS_FAIL,
84+
'scoring' => ScoreboardType::SCORING,
85+
],
86+
'help' => 'The type of scoreboard to use for this contest.',
87+
]);
7988
$builder->add('allowSubmit', ChoiceType::class, [
8089
'expanded' => true,
8190
'label' => 'Allow submit',

webapp/templates/jury/partials/contest_form.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
{{ form_row(form.endtimeString) }}
1616
{{ form_row(form.unfreezetimeString) }}
1717
{{ form_row(form.deactivatetimeString) }}
18+
{{ form_row(form.scoreboardType) }}
1819
{{ form_row(form.allowSubmit) }}
1920
{{ form_row(form.processBalloons) }}
2021
{{ form_row(form.runtimeAsScoreTiebreaker) }}

0 commit comments

Comments
 (0)