summaryrefslogtreecommitdiff
path: root/app/views/downloads/_form.html.erb
blob: 1ab1879041de4482eb971c264d10172d168ec56b (plain)
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
29
30
31
32
33
34
35
36
37
<%= form_for(@download) do |f| %>
  <% if @download.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@download.errors.count, "error") %> prohibited this download from being saved:</h2>

      <ul>
      <% @download.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :filename %><br>
    <%= f.text_field :filename %>
  </div>
  <div class="field">
    <%= f.label :type %><br>
    <%= f.text_field :type %>
  </div>
  <div class="field">
    <%= f.label :description %><br>
    <%= f.text_area :description %>
  </div>
  <div class="field">
    <%= f.label :hits %><br>
    <%= f.number_field :hits %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>