<h1 class="page-header">TOEIC TEST 3000</h1>
<div class="panel panel-inverse">
<div class="panel-heading">
  <h4 class="panel-title fl">TOEIC TEST 3000<%= yield(:panel_title) %></h4>
</div>
<div class="panel-body">
  <%= bootstrap_form_for([:admin, @toeic_test]) do |f| %>
    <%= f.text_field :title %>
    <%= f.file_field :test_file %>
    <%= f.text_field :question_title %>
    <%= f.file_field :question_file %>
    <%= f.text_field :answer_title %>
    <%= f.file_field :answer_file %>
    <%= render "shared/published_at", {f: f} %>
    <%= f.form_group :toeic_test_groups, label: {} do %>
      <%= f.fields_for :toeic_test_groups do |toeic_test_group| %>
        <%= render 'toeic_test_group_fields', {f: toeic_test_group} %>
      <% end %>
    <% end %>
    <%= link_to_add_fields "+ 対象クラスを追加", f, :toeic_test_groups, "toeic_test_group_fields" %>

    <%= f.form_group nil, label_col: "col-sm-3", control_col: "col-sm-9" do %>
      <%= f.submit submit_title, class: "btn btn-primary", style: "margin-top: 15px;" %>
      <%= link_to "戻る", admin_toeic_tests_path, class: "btn btn-default", style: "margin-top: 15px;" %>
    <% end %>
  <% end %>
</div>
</div>
