<%= form_for(@template, html: { multipart: true }) do |f| %>
  <%= render partial: "layouts/errors", object: @template %>

  <fieldset>
    <div class="clearfix">
      <%= f.label :name %>
      <div class="input">
        <%= f.text_field :name, autofocus: true, class: "input-xlarge" %>
      </div>
    </div>

    <div class="clearfix">
      <%= f.label :author %>
      <div class="input">
        <%= f.text_field :author, class: "input-xlarge" %>
      </div>
    </div>

    <div class="clearfix">
      <%= f.label :media %>
      <div class="input">
        <%= f.fields_for :media do |media| %>
          <%= media.file_field :file %>
        <% end %>
      </div>
    </div>

    <div class="clearfix">
      <div class="input checkbox">
        <%= f.check_box :is_hidden %> <%= f.label :is_hidden %>
      </div>
    </div>

  </fieldset>


  <div class="submit_bar actions">
    <%= f.submit button_text, class: "btn btn-primary" %> <%= link_to t(:cancel), screens_path, class: "btn" %>
  </div>
<% end %>
