google_drive_settings.mustache 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <%
  2. # Copyright (C) 2015 - 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. <%= fields_for :settings, OpenObject.new(settings) do |f| %>
  19. <table style="width: 500px;" class="formtable">
  20. <tr>
  21. <td colspan="2">
  22. Get correct information from your <a href="https://console.developers.google.com/project">Google Developer Console</a>
  23. </td>
  24. </tr>
  25. <tr>
  26. <td><%= f.blabel :client_id, :en => "Client ID" %></td>
  27. <td>
  28. <%= f.text_field :client_id %>
  29. </td>
  30. </tr>
  31. <tr>
  32. <td><%= f.blabel :client_secret, :en => "Client Secret" %></td>
  33. <td>
  34. <%= f.password_field :client_secret %>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td><%= f.blabel :redirect_uri, :en => "Redirect URI" %></td>
  39. <td>
  40. <%= f.text_field :redirect_uri %>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td><%= f.blabel :auth_uri, :en => "Auth URI" %></td>
  45. <td>
  46. <%= f.text_field :auth_uri %>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td><%= f.blabel :token_uri, :en => "Token URI" %></td>
  51. <td>
  52. <%= f.text_field :token_uri %>
  53. </td>
  54. </tr>
  55. <!-- a lot of work goes in to that bold 'OR' -->
  56. <tr>
  57. <td>
  58. <strong>OR</strong>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td colspan="2"><%= mt(:description, <<-TEXT, :google_url => 'https://console.developers.google.com/project')
  63. Paste the contents of client_secrets.json below. The text boxes above will be automatically filled in based on the content given below.
  64. TEXT
  65. %></td>
  66. </tr>
  67. <tr>
  68. <td><%= f.blabel :client_secret_json, :en => "Client secrets json" %></td>
  69. <td>
  70. <%= f.text_area :client_secret_json, :rows => '4' %>
  71. </td>
  72. </tr>
  73. </table>
  74. <% end %>