user_lists.mustache 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. <% root_account = @context.root_account %>
  19. <% account = @context.respond_to?(:account) ? @context.account : @context %>
  20. <% css_bundle("user_list_boxes") %>
  21. <div id="user_list_boxes">
  22. <a id="user_lists_path" style="display:none;" href="<%= polymorphic_path([@context, :user_lists], :format => :json) %>"></a>
  23. <div id="user_list_textarea_container" style="z-index: 2;">
  24. <input type="hidden" name="enrollment_type" value="StudentEnrollment" />
  25. <label for="user_list">
  26. <% if root_account.login_handle_name_is_customized? %>
  27. <%= t(:copy_and_paste_notice_with_login_handle,
  28. "Copy and paste a list of users. "\
  29. "You can use their email address or %{login_handle_name}.",
  30. login_handle_name: root_account.login_handle_name_with_inference) %>
  31. <% else %>
  32. <%= t(:copy_and_paste_notice_just_email,
  33. "Copy and paste a list of email addresses to add users.") %>
  34. <% end %>
  35. <textarea name="user_list" class="user_list" id="user_list"></textarea>
  36. <%= t :user_list_explanation,
  37. 'Sample format: "Example Student" <student@example.com>, '\
  38. '"Lastname, Firstname" <firstlast@example.com>, justAnEmailAddress@example.com' %>
  39. </label>
  40. </div>
  41. <div id="user_list_parsed" style="z-index: 1; display:none;">
  42. <div class="ui-helper-reset" id="user_lists_processed_people">
  43. <div id="user_list_duplicates_found" class="ui-widget">
  44. <div class="ui-state-highlight ui-corner-all">
  45. <p>
  46. <span style="float: left; margin-right: 0 0.3em;" class="ui-icon ui-icon-info"></span>
  47. <strong><%= before_label :notice, "Notice" %></strong>
  48. <span class="message_content"></span>
  49. </p>
  50. </div>
  51. </div>
  52. <div id="user_list_no_valid_users" class="ui-widget">
  53. <div class="ui-state-highlight ui-corner-all">
  54. <p><span style="float: left; margin-right: 0 0.3em;" class="ui-icon ui-icon-info"></span>
  55. <%= t :no_valid_users, "*Sorry,* it does not seem as if there were any valid email addresses or login IDs typed in, please go back and try again.", :wrapper => "<strong>\\1</strong>" %></p>
  56. </div>
  57. </div>
  58. <div id="user_list_with_errors" class="ui-widget">
  59. <div class="ui-state-highlight ui-corner-all">
  60. <p>
  61. <span style="float: left; margin-right: 0 0.3em;" class="ui-icon ui-icon-alert"></span>
  62. <strong><%= before_label :alert, "Alert" %></strong>
  63. <span class="message_content"></span>
  64. </p>
  65. </div>
  66. </div>
  67. <div class="person ui-helper-reset ui-state-default ui-corner-all" id="user_lists_processed_person_template" title="<%= t 'titles.new_user','New user' %>" style="display:none;" tabindex="0">
  68. <div class="name"></div>
  69. <div class="address"></div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>