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.
41 lines
1.5 KiB
41 lines
1.5 KiB
% layout 'default'; |
|
% title 'Zerobin -- View'; |
|
% my %times = (day => 1, week => 7, month => 30, quarter => 90, year => 395); |
|
% my @times = map { [l($_) => $times{$_}] } sort { $times{$a} <=> $times{$b} } keys(%times); |
|
% stash 'styles' => 'zerobin'; |
|
% param 'expire' => 30; |
|
% my $syntax = (stash 'syntax') || []; |
|
% param 'syntax' => ''; |
|
% my %opts = (id => 'paste', name => 'paste'); |
|
<h1>Создать запись</h1> |
|
<div> |
|
<%= form_for "/zerobin2" => (method => 'POST', enctype => "multipart/form-data") => begin %> |
|
<div> |
|
<span class="zerobin cblock"> |
|
<%= submit_button l('Save') %> |
|
</span> |
|
<span class="zerobin cblock"> |
|
<%= tag 'label' => (for => 'expire') => l('Keep for') %>: |
|
<%= select_field 'expire' => \@times %> |
|
</span> |
|
<span class="zerobin cblock"> |
|
<%= tag 'label' => (for => 'syntax') => l('Format') %>: |
|
<%= select_field 'syntax' => $syntax; %> |
|
</span> |
|
</div> |
|
<p> |
|
<input type="radio" name="source" value="form" checked="1">Копипаст ↓↓↓</input> |
|
<input type="radio" name="source" value="file">или файл →</input> |
|
<input type="file" name="file"> |
|
</p> |
|
<div> |
|
<%= tag 'textarea' => (placeholder => l('Paste your text here'), %opts) => '' %> |
|
</div> |
|
<% end %> |
|
</div> |
|
% my $result = (flash 'result') || ''; |
|
% if ($result) { |
|
<div> |
|
<p style="color: red; font-size: 14pt;"><%= l(ucfirst($result)) %></p> |
|
</div> |
|
% }
|
|
|