use 5.014000;
use strict;
use warnings;
-use parent qw/Exporter/;
-our @EXPORT_OK = qw/generate/;
+use Gruntmaster::Page::Base submit => 'Submit job';
+our @ISA = qw/Gruntmaster::Page::Base/;
our $VERSION = '0.001';
-use constant FORMATS => [qw/CPP/];
-use constant TITLE => 'Submit job';
+use constant FORMATS => [qw/C CPP JAVA PERL PYTHON/];
-use Fcntl qw/:flock/;
-use HTML::Template::Compiled;
-use YAML::Any qw/LoadFile/;
-use Gruntmaster::Page::Common qw/header footer/;
-use Gruntmaster::Data qw//;
-
-my %templates = (
+use constant TEMPLATES => {
en => <<'HTML',
<form action="https://gm.ieval.ro/action/submit" method="POST" enctype="multipart/form-data">
<label>Problem:<br>
<input type="submit" value="Submit job">
HTML
-);
+};
-$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates;
-$templates{$_} .= footer $_ for keys %templates;
+sub _generate{
+ my ($self, $htc, $path, $lang) = @_;
-sub generate{
- my $htc = HTML::Template::Compiled->new(scalarref => \$templates{$_[1]});
my @problems = map +{ id => $_, name => problem_name }, problems;
$htc->param(problems => \@problems);
$htc->param(formats => FORMATS);
- $htc->output
}
1