]> iEval git - plack-app-gruntmaster.git/blame_incremental - lib/Gruntmaster/Page/Submit.pm
Fix and update standings
[plack-app-gruntmaster.git] / lib / Gruntmaster / Page / Submit.pm
... / ...
CommitLineData
1package Gruntmaster::Page::Submit;
2
3use 5.014000;
4use strict;
5use warnings;
6use Gruntmaster::Page::Base submit => 'Submit job';
7our @ISA = qw/Gruntmaster::Page::Base/;
8our $VERSION = '0.001';
9
10use constant FORMATS => [qw/C CPP MONO JAVA PASCAL PERL PYTHON/];
11
12use constant TEMPLATES => {
13 en => <<'HTML',
14<form action="https://gm.ieval.ro/action/submit" method="POST" enctype="multipart/form-data">
15<label>Problem:<br>
16<select name="problem" required>
17<tmpl_loop problems><option value="<tmpl_var id>"><tmpl_var name></option>
18</tmpl_loop></select></label><p>
19
20<label>File:<br>
21<input name="prog" required type="file"></label><p>
22
23<label>File format:<br>
24<select name="prog_format" required>
25<tmpl_loop formats><option value="<tmpl_var _>"><tmpl_var _></option>
26</tmpl_loop></select></label><p>
27
28<input type="submit" value="Submit job">
29HTML
30};
31
32sub _generate{
33 my ($self, $htc, $path, $lang) = @_;
34
35 my @problems = map +{ id => $_, name => problem_name }, problems;
36 $htc->param(problems => \@problems);
37 $htc->param(formats => FORMATS);
38}
39
401
This page took 0.015412 seconds and 4 git commands to generate.