Mercurial > zeropaste
annotate app/views/pastes/_form.html.erb @ 191:4e409ac7082d
Also expires the page upon deletion.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sat, 23 Feb 2013 14:53:47 +0900 |
parents | b4b7a29b70f6 |
children | 0993715b455d |
rev | line source |
---|---|
2 | 1 <%= form_for(@paste) do |f| %> |
2 <% if @paste.errors.any? %> | |
56
8ef70e8c239d
Bootstrap-styled error message.
Edho Arief <edho@myconan.net>
parents:
39
diff
changeset
|
3 <div class="alert alert-error" id="error_explanation"> |
8ef70e8c239d
Bootstrap-styled error message.
Edho Arief <edho@myconan.net>
parents:
39
diff
changeset
|
4 <h5><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h5> |
2 | 5 |
6 <ul> | |
7 <% @paste.errors.full_messages.each do |msg| %> | |
8 <li><%= msg %></li> | |
9 <% end %> | |
10 </ul> | |
11 </div> | |
12 <% end %> | |
13 | |
14 <div class="field"> | |
35 | 15 <%= f.text_area :paste, :class => 'span12', :rows => 10 %> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
56
diff
changeset
|
16 |
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
56
diff
changeset
|
17 <%= f.text_field :key %> |
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
56
diff
changeset
|
18 <span class="help-inline"><%= f.label :key, 'Deletion key' %></span> |
2 | 19 </div> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
56
diff
changeset
|
20 |
29 | 21 <div class="form-actions"> |
22 <%= f.submit :class => 'btn btn-primary' %> | |
39 | 23 <%= link_to 'Clear', root_path, :class => 'btn', :id => 'reset_paste' %> |
2 | 24 </div> |
25 <% end %> |