%= form_for(@template, :html => {:multipart => true}) do |f| %>
<% if @template.errors.any? %>
<%= pluralize(@template.errors.count, "error") %> prohibited this template from being saved:
<% @template.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :author %>
<%= f.text_field :author %>
<%= f.file_field :preview %>
<%= f.hidden_field :preview_cache %>
<%= f.file_field :template %>
<%= f.hidden_field :template_cache %>
<%= f.submit %>
<% end %>