<div class="modal fade" tabindex="-1" role="dialog" id="copy-discipline-content-record-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.discipline_content_records').downcase %></h4>
      </div>
      <%= simple_form_for DisciplineContentRecordClonerForm.new, url: clone_discipline_content_records_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%"><%= ContentRecord.human_attribute_name :classroom %></th>
              <th width="40%"><%= DisciplineContentRecord.human_attribute_name :discipline %>
              <th width="15%"><%= ContentRecord.human_attribute_name :record_date %></th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="classroom"></td>
              <td class="discipline"></td>
              <td class="record_date"></td>
            </tr>
          </tbody>
        </table>
        <%= f.input :discipline_content_record_id, as: :hidden %>
        <table class="table table-striped table-bordered table-condensed records">
          <thead>
            <tr>
              <th width="65%"><%= ContentRecord.human_attribute_name :classroom %></th>
              <th width="25%"><%= ContentRecord.human_attribute_name :record_date %></th>
              <th width="10%"></th>
            </tr>
          </thead>
          <tbody id="discipline-content-record-modal-items">
            <%= f.simple_fields_for :discipline_content_record_item_cloner_form do |item| %>
              <%= render 'discipline_content_record_item_cloner_form_fields.html', f: item %>
            <% end %>
          </tbody>
          <tfoot class="links">
            <tr>
              <td colspan="4">
                <%= link_to_add_association t('discipline_content_records.content_fields.add_item'), f, :discipline_content_record_item_cloner_form,
                  class: 'btn btn-success btn-sm', "data-association-insertion-method": "append",
                                                    "data-association-insertion-node": "#discipline-content-record-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>