-
Notifications
You must be signed in to change notification settings - Fork 0
/
_form.html.erb
executable file
·28 lines (21 loc) · 1017 Bytes
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<% @attachment = @plot.attachments.new %>
<%= form_for ([@cemetery, @plot, @attachment]), :class=> "form-horizontal panel", :html => { :multipart => true} do |f| %>
<div class="panel-body">
<% if @attachment.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@attachment.errors.count, "error") %> prohibited this attachment from being saved:</h2>
<ul>
<% @attachment.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.file_field :photo, multiple: true, name: 'attachment[photo]', :hint=> "You can select multiple files" %>
</div>
<div class="panel-footer text-right actions">
<%= f.submit "save", class: 'btn' %>
</div>
<% end %>
<% # jquery upload template # %>
<script id="template-upload" type="text/x-tmpl"><div class="upload">{%=o.name%}<div class="progress"><div class="progress-bar bar" style="width: 0%"></div></div></div></script>