<div class="modal fade" tabindex="-1" role="dialog" id="copy-knowledge-area-lesson-plan-modal" aria-hidden="true">
  <div class="modal-dialog  modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Fechar</span></button>
        <h4 class="modal-title">Copiar <%= Translator.t('navigation.knowledge_area_lesson_plans').downcase %></h4>
      </div>
      <%= simple_form_for KnowledgeAreaLessonPlanClonerForm.new, url: clone_knowledge_area_lesson_plans_path, remote: true, html: { class: 'smart-form' } do |f| %>
      <div class="modal-body">
        <table class="table table-bordered table-striped table-condensed table-hover">
          <thead>
            <tr>
              <th width="30%"><%= LessonPlan.human_attribute_name :classroom %></th>
              <th width="40%"><%= KnowledgeAreaLessonPlan.human_attribute_name :knowledge_area_ids %>
              <th width="15%"><%= LessonPlan.human_attribute_name :start_at %></th>
              <th width="15%"><%= LessonPlan.human_attribute_name :end_at %></th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="classroom"></td>
              <td class="knowledge_area"></td>
              <td class="start_at"></td>
              <td class="end_at"></td>
            </tr>
          </tbody>
        </table>
        <%= f.input :knowledge_area_lesson_plan_id, as: :hidden %>
        <table class="table table-striped table-bordered table-condensed records">
          <thead>
            <tr>
              <th width="40%"><%= LessonPlan.human_attribute_name :classroom %></th>
              <th width="25%"><%= LessonPlan.human_attribute_name :start_at %></th>
              <th width="25%"><%= LessonPlan.human_attribute_name :end_at %></th>
              <th width="10%"></th>
            </tr>
          </thead>
          <tbody id="knowledge-area-lesson-plan-modal-items">
            <%= f.simple_fields_for :knowledge_area_lesson_plan_item_cloner_form do |item| %>
              <%= render 'knowledge_area_lesson_plan_item_cloner_form_fields.html', f: item %>
            <% end %>
          </tbody>
          <tfoot class="links">
            <tr>
              <td colspan="4">
                <%= link_to_add_association t('knowledge_area_lesson_plans.content_fields.add_item'), f, :knowledge_area_lesson_plan_item_cloner_form,
                  class: 'btn btn-success btn-sm', "data-association-insertion-method": "append",
                                                    "data-association-insertion-node": "#knowledge-area-lesson-plan-modal-items" %>
              </td>
            </tr>
          </tfoot>
        </table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
        <button type="submit" class="btn btn-primary" >Confirmar</button>
      </div>
      <% end %>
    </div>
  </div>
</div>