<tr class="nested-fields student-tr" id=<%= "tr_student_#{f.object.student_id}"%>>
  <% present(f.object) do |student| %>
    <td>
     <div class="controls input">
        <label class="checkbox" style="margin-top: 0;">
          <input class="boolean optional exempt_student_check"
                type="checkbox"
                value=<%= student.student_id %>
                id=<%= "exempt_student_check_#{student.student_id}"%>
                <%= 'disabled' if student.exempted || !student.active || student.exempted_from_discipline %>>
          <%= sequence %><i></i>
        </label>
      </div>
      <%= f.hidden_field :id %>
      <%= f.hidden_field :active %>
      <%= f.hidden_field :_destroy, value: (student.exempted_from_discipline ? true : nil) %>
    </td>

    <td>
      <%= f.input :student_id, as: :hidden %>
      <span id=<%= "student_name_#{student.student_id}"%>
            class="<%= student.student_name_class %>"><%= student.student_name %></span>
    </td>

    <td>
      <%= do_undo_link(student, @daily_note) %>

      <div style="overflow: hidden; padding-right: .5em;">
      <%= f.input(
        :note,
        label_html: { class: 'hidden', style: 'width: 100%;' },
        input_html: {
          class: ('exempted-student' if student.exempted),
          data: {
            inputmask: "'digits': #{student.number_of_decimal_places}"
          }
        },
        readonly: student.exempted || !student.active || student.exempted_from_discipline || student.in_active_search,
        placeholder: ('Dispensado' if student.exempted && !student.in_active_search)
      ) %>
      </div>
    </td>
  <% end %>
</tr>
