]>
iEval git - plack-app-gruntmaster.git/blob - lib/Gruntmaster/Page/Submit.pm
1 package Gruntmaster
::Page
::Submit
;
6 use Gruntmaster
::Page
::Base submit
=> 'Submit job';
7 our @ISA = qw
/Gruntmaster::Page::Base/;
8 our $VERSION = '0.001';
10 use constant FORMATS
=> [qw
/C CPP MONO JAVA PASCAL PERL PYTHON RUBY/];
12 use constant TEMPLATES
=> {
14 <form action="https://gm.ieval.ro/action/submit" method="POST" enctype="multipart/form-data">
16 <select name="problem" required>
17 <tmpl_loop problems><option value="<tmpl_var id>"><tmpl_var name></option>
18 </tmpl_loop></select></label><p>
21 <input name="prog" required type="file"></label><p>
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>
28 <input type="submit" value="Submit job">
33 my ($self, $htc, $path, $lang) = @_;
35 my @problems = map +{ id
=> $_, name
=> problem_name
}, problems
;
36 $htc->param(problems
=> \
@problems);
37 $htc->param(formats
=> FORMATS
);
This page took 0.05112 seconds and 5 git commands to generate.