<%= form_for([:admin, @download], :html => {:id => "download_form"}) do |f| %>
<%= f.label :name %>*
<%= f.text_field :name, :class => "title" %> <%= f.error_message_on :name %>
<%= f.label :url %>*
<%= f.text_field :url, :class => 'fullwidth' %> <%= f.error_message_on :url %>
<%= f.label :download_category_id %>*
<%= f.select :download_category_id, @download_categories.collect {|category| [category.name, category.id]} %> <%= f.error_message_on :download_category_id %>
<%= f.label :language_id %>*
<%= f.select :language_id, @languages.collect {|language| [language[:name], language[:id]]} %> <%= f.error_message_on :language_id %>
<%= f.label :products %>*
<% @products.each do |product| -%> <%= check_box_tag "download[product_ids][]", product.id, @download.is_relevant_for_product?(product), :id => "download_product_id_#{product.id}" -%> <%= f.label "product_id_#{product.id}", product.name -%>
<% end -%> <%= f.error_message_on :products %>
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
<% end %>