<h3 class="fieldset-heading">RIDs</h3>

<%= form_for(@report_request, url: save_rids_report_request_path(@report_request), method: 'post', remote: true) do |f| %>

  <%= hidden_field_tag 'report_request[report_id]', @report_request.report_id %>

  <table class="table table-striped">
      <thead>
        <tr>
            <th>rid</th>
            <th>EMIX</th>
            <th>Reading Type</th>
            <th>Min Sample Period</th>
            <th>Max Sample Period</th>
            <th>Include?</th>
        </tr>
      </thead>

      <%= render 'report_interval_descriptions', report_interval_descriptions: @report_request.selected_rids, checked: true %>

      <%= render 'report_interval_descriptions', report_interval_descriptions: @report_request.unselected_rids, checked: false %>

  </table>

  <div class="actions">
      <%= f.submit "Save" %>
  </div>

<% end %>