Remove cansubmit/nosubmit
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 29 Mar 2015 21:03:03 +0000 (00:03 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 12 Aug 2015 15:15:49 +0000 (18:15 +0300)
lib/Plack/App/Gruntmaster/HTML.pm
tmpl/pb_entry.en

index f08b66be3faadb6dca1b64fa77105410e700cb2f..b67ef296cf544a0164e7ecadb175a33485680d6c 100644 (file)
@@ -193,16 +193,11 @@ sub process_pb_entry {
                $_->detach for $tree->fclass('rc'); # requires contest
                $tree->fid('solution_modal')->replace_content(literal $args{solution});
        }
-       if ($args{cansubmit}) {
-               $tree->fid('nosubmit')->detach;
-               $tree->look_down(name => 'problem')->attr(value => $args{id});
-               my $contest = $tree->look_down(name => 'contest');
-               $contest->attr(value => $args{args}{contest}) if $args{args}{contest};
-               $contest->detach unless $args{args}{contest}
-       } else {
-               $tree->fid('nosubmit')->find('a')->edit_href(sub{s/id/$args{id}/});
-               $tree->fid('submit')->detach
-       }
+
+       $tree->look_down(name => 'problem')->attr(value => $args{id});
+       my $contest = $tree->look_down(name => 'contest');
+       $contest->attr(value => $args{args}{contest}) if $args{args}{contest};
+       $contest->detach unless $args{args}{contest}
 }
 
 sub process_sol {
index 8f42d1bb46e81b0bc2dd47505c07945ffc04c3e5..f2709e321eb83bb1424dfe511063dc39eb1d5842 100644 (file)
 
 <h1>Submit solution</h1>
 
-<div id="nosubmit">
-The contest has finished.<br>
-To submit solutions to this problem, please visit the problem <a href="/pb/id">outside&nbsp;the&nbsp;contest</a>.
-</div>
-
 <div id="submit">
 <form id="submitform" action="/action/submit" method="POST" enctype="multipart/form-data" role="form">
 <input type="hidden" name="problem" value="problem_id">
This page took 0.01142 seconds and 4 git commands to generate.