<%= form_for(template) do |f| %>
  <% if template.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(template.errors.count, "error") %> prohibited this template from being saved:</h2>

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

  <div class="field">
    <%= f.label :title %>
    <%= f.text_field :title %>
  </div>

  <div class="field">
    <%= f.label :desc %>
    <%= f.text_area :desc %>
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
