Browse Source

* /zerobin2/create : file upload

master
Alex 'AdUser' Z 9 years ago
parent
commit
5ab42adfe2
  1. 9
      templates/zerobin/create.html.ep

9
templates/zerobin/create.html.ep

@ -6,10 +6,10 @@
% param 'expire' => 30; % param 'expire' => 30;
% my $syntax = (stash 'syntax') || []; % my $syntax = (stash 'syntax') || [];
% param 'syntax' => ''; % param 'syntax' => '';
% my %opts = (id => 'paste', name => 'paste', required => 1); % my %opts = (id => 'paste', name => 'paste');
<h1>Создать запись</h1> <h1>Создать запись</h1>
<div> <div>
<%= form_for "/zerobin2" => (method => 'POST') => begin %> <%= form_for "/zerobin2" => (method => 'POST', enctype => "multipart/form-data") => begin %>
<div> <div>
<span class="zerobin cblock"> <span class="zerobin cblock">
<%= submit_button l('Save') %> <%= submit_button l('Save') %>
@ -23,6 +23,11 @@
<%= select_field 'syntax' => $syntax; %> <%= select_field 'syntax' => $syntax; %>
</span> </span>
</div> </div>
<p>
<input type="radio" name="source" value="form" checked="1">Копипаст &darr;&darr;&darr;</input>
<input type="radio" name="source" value="file">или файл &rarr;</input>&nbsp;
<input type="file" name="file">
</p>
<div> <div>
<%= tag 'textarea' => (placeholder => l('Paste your text here'), %opts) => '' %> <%= tag 'textarea' => (placeholder => l('Paste your text here'), %opts) => '' %>
</div> </div>

Loading…
Cancel
Save