show.mustache 1.9 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. <% content_for :page_title do %><%= join_title t(:page_title, "Plugin Settings"), @plugin.name %><% end %>
  19. <%
  20. js_bundle :plugins
  21. add_crumb(t('#crumbs.plugins', "Plugins"), plugins_path)
  22. add_crumb(@plugin.name)
  23. %>
  24. <h2><%= join_title t(:page_title, "Plugin Settings"), @plugin.name %></h2>
  25. {{> views/settings_header}}
  26. <div id="settings">
  27. <%= form_for(@plugin_setting, :url => plugin_path(@plugin.id), :html => {:method => :put}) do |f| %>
  28. <div style="margin-bottom: 15px; margin-top: -10px;">
  29. <%= f.check_box :disabled, :class => "disabled_checkbox" %>
  30. <%= f.label :disabled, :en => "Disable this Plugin" %>
  31. </div>
  32. <% partial = render :partial => @plugin.settings_partial, :locals => {:settings => (@plugin_setting.settings || {}).merge(params[:settings]&.to_unsafe_h || {})} %>
  33. <%= f.error_messages if !@error_messages_handled %>
  34. <div class="box tabular plugin_settings">
  35. <%= partial %>
  36. </div>
  37. <div class='button-container'>
  38. <button type="submit" class="btn save_button"><%= t '#buttons.apply', "Apply" %></button>
  39. <%=link_to(t(:back_to_list, "Return to plugins list"), plugins_path,:class => 'btn btn button-secondary')%>
  40. </div>
  41. <% end %>
  42. </div>
  43. <p></p>