You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
882 B

% layout 'default';
% title 'Imgbin -- Create';
% stash 'styles' => 'zerobin';
% my %times = (day => 1, week => 7, month => 30, quarter => 90, year => 395);
% my @times = map { [l($_) => $times{$_}] } sort { $times{$a} <=> $times{$b} } keys(%times);
<h1>Загрузить файл</h1>
<div>
<%= form_for "/imgbin" => (method => 'POST', enctype => 'multipart/form-data') => begin %>
<div>
<span class="zerobin cblock">
<%= submit_button l('Upload') %>
</span>
<span class="zerobin cblock">
<%= tag 'label' => (for => 'expire') => l('Keep for') %>:
<%= select_field 'expire' => \@times %>
</span>
</div>
<hr/>
<div>
<%= file_field 'file', required => 1 %>
</div>
<% end %>
</div>
% if (my $error = flash 'error') {
<div>
<p style="color: red; font-size: 14pt;"><%= l(ucfirst($error)) %></p>
</div>
% }