confirm_action.mustache 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. <% add_crumb t('#crumbs.confirmation', "Confirmation") %>
  19. <% content_for :page_title, t('titles.confirm', 'Confirm Action') %>
  20. <div style="margin: 10px auto; width: 600px;">
  21. <% if params[:event] == "delete" %>
  22. <h1>{{#t}}Confirm Course Deletion{{/t}}</h1>
  23. <%= t 'details.confirm_delete', %{Are you sure you want to delete this course? Once it is deleted, students and teachers will no longer have access to it. If you just want to remove it from the course drop-down menu, you should *conclude the course instead*.}, :wrapper => link_to('\1', context_url(@context, :context_confirm_action_url, :event => 'conclude')) %>
  24. <%= t 'details.confirm_delete_addendum', %{If you do not have permission to conclude the course, you can *change the course end date*, or ask your administrator to conclude the course. }, :wrapper => link_to('\1', course_settings_url(@context)) %>
  25. <%= form_tag context_url(@context, :context_url), {:method => :delete} do %>
  26. <input type="hidden" name="event" value="delete"/>
  27. <div class="form-actions">
  28. <a href="<%= course_settings_url(@context) %>" class="btn">{{#t}}Cancel{{/t}}</a>
  29. <button class="btn btn-danger" type="submit">{{#t}}Delete Course{{/t}}</button>
  30. </div>
  31. <% end %>
  32. <% else %>
  33. <h1>{{#t}}Confirm Conclude Course{{/t}}</h1>
  34. <p><%= t 'details.confirm_conclude', %{Warning: Concluding the course will archive all course content and prevent you from modifying grades.} %></p>
  35. <p><%= t 'details.conclude_alt_text', %{If you would like to retain the ability to change grades while limiting student access to the course, please utilize the course dates settings. You can learn about course date settings in our guides *here*.}, :wrapper => link_to('\1', "https://community.canvaslms.com/docs/DOC-2910") %></p>
  36. <%= form_tag context_url(@context, :context_url), {:method => :delete} do %>
  37. <input type="hidden" name="event" value="conclude"/>
  38. <div class="form-actions">
  39. <a href="<%= course_settings_url(@context) %>" class="btn">{{#t}}Cancel{{/t}}</a>
  40. <button class="btn btn-primary" type="submit">{{#t}}Conclude Course{{/t}}</button>
  41. </div>
  42. <% end %>
  43. <% end %>
  44. </div>