|
|
|
@ -3,11 +3,14 @@
|
|
|
|
|
% 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'; |
|
|
|
|
% stash 'expire' => 30; |
|
|
|
|
% param 'expire' => 30; |
|
|
|
|
% my $syntax = (stash 'syntax') || []; |
|
|
|
|
% param 'syntax' => ''; |
|
|
|
|
% my %opts = (id => 'paste', name => 'paste', required => 1); |
|
|
|
|
<h1>Создать запись</h1> |
|
|
|
|
<div> |
|
|
|
|
<div> |
|
|
|
|
<%= form_for "/zerobin2/create" => (method => 'POST') => begin %> |
|
|
|
|
<%= form_for "/zerobin2" => (method => 'POST') => begin %> |
|
|
|
|
<div> |
|
|
|
|
<span class="zerobin cblock"> |
|
|
|
|
<%= submit_button l('Save') %> |
|
|
|
|
</span> |
|
|
|
@ -16,13 +19,18 @@
|
|
|
|
|
<%= select_field 'expire' => \@times %> |
|
|
|
|
</span> |
|
|
|
|
<span class="zerobin cblock"> |
|
|
|
|
<%= check_box 'syntax' => 0 %> |
|
|
|
|
<%= tag 'label' => (for => 'syntax') => l('Syntax highlight') %> |
|
|
|
|
<%= tag 'label' => (for => 'syntax') => l('Syntax') %>: |
|
|
|
|
<%= select_field 'syntax' => $syntax; %> |
|
|
|
|
</span> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
<hr style="width: 50%"/> |
|
|
|
|
<div> |
|
|
|
|
<%= tag 'textarea' => (id => "paste", placeholder => l('Paste your text here')) => '' %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<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> |
|
|
|
|
% } |
|
|
|
|