<% content_for :js do %>
  <%= javascript_include_tag 'views/partial_score_record_report/form' %>
<% end %>
<div class="widget-body no-padding">
  <%= simple_form_for @partial_score_record_report_form, url: partial_score_record_report_path, method: :post, html: { class: 'smart-form', target: '_blank' } do |f| %>
    <%= f.error_notification unless @partial_score_record_report_form.errors[:base].any? %>

    <div class="alert alert-danger <%= 'hidden' unless @partial_score_record_report_form.errors[:base].any? %>">
      <i class="fa fa-exclamation-circle fa-fw"></i>
      <%= @partial_score_record_report_form.errors[:base].first %>
    </div>

    <fieldset>
      <div class="row">
        <div class="col col-sm-4">
          <%= f.input :unity_id, as: :select2_unity, user: current_user %>
          <%= f.hidden_field :school_calendar_year %>
        </div>

        <div class="col col-sm-4">
          <%= f.input :classroom_id, as: :select2, elements: classrooms,
                input_html: { value: @partial_score_record_report_form.classroom_id } %>
        </div>
        <div class="col col-sm-4">
          <%= f.input :students_ids, as: :select2, elements: students, input_html: { value: @partial_score_record_report_form.students_ids } %>
        </div>
      </div>

      <div class="row">
        <div class="col col-sm-4 hidden" school-step-container>
          <%= f.input :school_calendar_step_id, as: :select2, elements: school_calendar_steps_ordered, input_html: { value: @partial_score_record_report_form.school_calendar_step_id }, required: true %>
        </div>
        <div class="col col-sm-4 hidden" classroom-step-container>
          <%= f.input :school_calendar_classroom_step_id, as: :select2, elements: school_calendar_classroom_steps, input_html: { value: @partial_score_record_report_form.school_calendar_classroom_step_id }, required: true %>
        </div>
      </div>
    </fieldset>

    <footer>
      <%= f.submit 'Imprimir', class: 'btn btn-primary' %>
    </footer>
  <% end %>
</div>
