You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.5 KiB

  1. <header class="page-header" role="banner">
  2. <h1><%= t('.title') %></h1>
  3. </header>
  4. <main role="main">
  5. <p class="h4">
  6. <%= raw t('.prompt', client_name: "<strong class=\"text-info\">#{ @pre_auth.client.name }</strong>") %>
  7. </p>
  8. <% if @pre_auth.scopes.count > 0 %>
  9. <div id="oauth-permissions">
  10. <p><%= t('.able_to') %>:</p>
  11. <ul class="text-info">
  12. <% @pre_auth.scopes.each do |scope| %>
  13. <li><%= t scope, scope: [:doorkeeper, :scopes] %></li>
  14. <% end %>
  15. </ul>
  16. </div>
  17. <% end %>
  18. <div class="actions">
  19. <%= form_tag oauth_authorization_path, method: :post do %>
  20. <%= hidden_field_tag :client_id, @pre_auth.client.uid %>
  21. <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %>
  22. <%= hidden_field_tag :state, @pre_auth.state %>
  23. <%= hidden_field_tag :response_type, @pre_auth.response_type %>
  24. <%= hidden_field_tag :scope, @pre_auth.scope %>
  25. <%= submit_tag t('doorkeeper.authorizations.buttons.authorize'), class: "btn btn-success btn-lg btn-block" %>
  26. <% end %>
  27. <%= form_tag oauth_authorization_path, method: :delete do %>
  28. <%= hidden_field_tag :client_id, @pre_auth.client.uid %>
  29. <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %>
  30. <%= hidden_field_tag :state, @pre_auth.state %>
  31. <%= hidden_field_tag :response_type, @pre_auth.response_type %>
  32. <%= hidden_field_tag :scope, @pre_auth.scope %>
  33. <%= submit_tag t('doorkeeper.authorizations.buttons.deny'), class: "btn btn-danger btn-lg btn-block" %>
  34. <% end %>
  35. </div>
  36. </main>