link_enrollment.mustache 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <% js_bundle :link_enrollment %>
  19. <div id="link_student_dialog" style="display: none;">
  20. <a href="<%= context_url(@context, :context_students_url) %>" class="student_url" style="display: none;">&nbsp;</a>
  21. <%= form_tag context_url(@context, :context_link_enrollment_url), {:id => "link_student_dialog_form"} do %>
  22. <input type="hidden" name="enrollment_id" class="enrollment_id ic-Input"/>
  23. <%= mt 'details', %{When an observer is linked to a student, they have access to that student's grades and course interactions. *Right now this observer is linked to the student, %{student}.*
  24. To link the course observer %{user} to a student, select the student's name from the list below.},
  25. :wrapper => '<span class="existing_user"> \1</span>',
  26. :student => '<b class="existing_user_name">&nbsp;</b>'.html_safe,
  27. :user => '<b class="short_name">&nbsp;</b>'.html_safe %>
  28. <p class="loading_message">{{#t}}Loading Students...{{/t}}</p>
  29. <p class="students_link" style="display: none;">
  30. <label for="student_enrollment_link_option" class="ic-Label"><%= before_label('student', %{Student}) %></label>
  31. <select name="student_id" class="student_options" id="student_enrollment_link_option">
  32. <option value="none" class="blank">[ {{#t}}Select Student{{/t}} ]</option>
  33. </select>
  34. </p>
  35. <div class="button-container">
  36. <button type="submit" class="btn save_button">{{#t}}Link to Student{{/t}}</button>
  37. <button type="button" class="btn button-secondary cancel_button">{{#t}}Cancel{{/t}}</button>
  38. </div>
  39. <% end %>
  40. </div>