terms_required.mustache 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <%
  2. # Copyright (C) 2013 - 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. <%
  19. content_for :page_title, t('updated_terms_of_use', 'Updated Terms of Use')
  20. js_bundle :terms_of_use
  21. css_bundle :login_confirm
  22. disable_account_css
  23. @headers = false
  24. @body_classes ||= []
  25. @body_classes << "modal body--login-confirmation"
  26. %>
  27. <%= form_tag("/api/v1/users/self", method: "put", class: "reaccept_terms ic-Login-confirmation", id: "modal-box") do %>
  28. <header class="ic-Login-confirmation__header">
  29. <%= image_tag("login/canvas-logo@2x.png", class:"ic-Login-confirmation__logo", alt:"Canvas by Instructure") %>
  30. </header>
  31. <div class="ic-Login-confirmation__content">
  32. <h2 class="ic-Login-confirmation__headline"><%= t 'updated_terms_of_use', 'Updated Terms of Use' %></h2>
  33. <% if @domain_root_account.terms_required? %>
  34. <% TermsOfService.ensure_terms_for_account(@domain_root_account) %>
  35. <% js_env(:TERMS_OF_SERVICE_CUSTOM_CONTENT => @domain_root_account.terms_of_service.terms_of_service_content&.content) %>
  36. <% js_bundle :terms_of_service_modal %>
  37. <% end %>
  38. <p>
  39. <p>
  40. <div class="terms-of-service__link" id=terms_of_service_link></div>
  41. <%= t "Either you're a new user or the *terms of use* have changed since you last agreed to them. Please agree to the *terms of use* before you continue.",
  42. wrapper: {
  43. '*' => link_to('\1', "#", class: 'terms_of_service_link'),
  44. }
  45. %>
  46. </p>
  47. <label class="checkbox">
  48. <input type="checkbox" name="user[terms_of_use]" value="1">
  49. <%= agree_to_terms %>
  50. </label>
  51. <input type="hidden" name="redirect_to_previous" value="true" />
  52. </p>
  53. <div class="button_box ic-Login-confirmation__actions">
  54. <%= link_to(t("#buttons.cancel", "Cancel"), logout_path, :method => :delete, :class => "btn logout") %>
  55. <button type="submit" class="Button Button--primary"><%= t "#buttons.submit", "Submit" %></button>
  56. </div>
  57. </div>
  58. <% end %>