vegantech/sims

View on GitHub
app/views/district/students/check_id_state.js.erb

Summary

Maintainability
Test Coverage
<% if @student %>
  <% if current_district.can_claim?(@student) %>
    $('#claim_student').html('<%=link_to "Claim #{@student} for your district", claim_district_student_path(@student), :method => :put, :id => 'claim_student_link'%>');
    $('#student_last_name').focus();
    alert("Follow the link at the top if you want to claim this student for your district");
  <% else %>
    alert("Student exists in <%=@student.district%>  You may have mistyped the id, or the other district has not yet removed this student.");
    $('#student_id_state').focus();
  <% end %>
<% end %>