comparison app/views/pastes/_form.html.erb @ 260:c4aba8990c5e

Fix new paste form.
author edogawaconan <me@myconan.net>
date Tue, 15 Oct 2013 21:52:08 +0900
parents 0993715b455d
children 6cca1ab53337
comparison
equal deleted inserted replaced
259:5d084a9716ca 260:c4aba8990c5e
1 <%= form_for(@paste) do |f| %> 1 <%= form_for @paste do |f| %>
2 <% if @paste.errors.any? %> 2 <% if @paste.errors.any? %>
3 <div class="alert alert-error" id="error_explanation"> 3 <div class="alert alert-error" id="error_explanation">
4 <h5><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h5> 4 <h5><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h5>
5 5
6 <ul> 6 <ul>
9 <% end %> 9 <% end %>
10 </ul> 10 </ul>
11 </div> 11 </div>
12 <% end %> 12 <% end %>
13 13
14 <div class="field"> 14 <div class="form-group">
15 <%= f.text_area :paste, :class => 'span12', :rows => 10 %> 15 <%= f.text_area :paste, :rows => 10, :class => "form-control" %>
16
17 <div class="form-horizontal">
18 <div class="control-group">
19 <%= f.label :key, "Deletion key", class: "control-label" %>
20 <div class="controls">
21 <%= f.text_field :key %>
22 </div>
23 </div>
24 <div class="control-group">
25 <%= f.label :is_private, "Make private", class: "control-label" %>
26 <div class="controls">
27 <%= f.check_box :is_private %>
28 </div>
29 </div>
30 </div>
31 </div> 16 </div>
32 17
33 <div class="form-actions"> 18 <div class="form-group">
34 <%= f.submit :class => 'btn btn-primary' %> 19 <%= f.label :key, "Deletion key", class: "control-label" %>
35 <%= link_to 'Clear', root_path, :class => 'btn', :id => 'reset_paste' %> 20 <div class="row"><div class="col-sm-3">
21 <%= f.text_field :key, :class => "form-control" %>
22 </div></div>
36 </div> 23 </div>
24 <div class="checkbox">
25 <%= f.label :is_private do %>
26 <%= f.check_box :is_private %>
27 Private
28 <% end %>
29 </div>
30 <%= f.submit :class => 'btn btn-primary' %>
31 <%= link_to 'Clear', root_path, :class => 'btn btn-danger', :id => 'reset_paste' %>
37 <% end %> 32 <% end %>