new.html.haml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. - content_for :page_title do
  2. = t('doorkeeper.authorizations.new.title')
  3. .form-container.simple_form
  4. .oauth-prompt
  5. %h3= t('doorkeeper.authorizations.new.title')
  6. %p= t('doorkeeper.authorizations.new.prompt_html', client_name: content_tag(:strong, @pre_auth.client.name))
  7. %h3= t('doorkeeper.authorizations.new.review_permissions')
  8. %ul.permissions-list
  9. - grouped_scopes(@pre_auth.scopes).each do |scope|
  10. %li.permissions-list__item
  11. .permissions-list__item__icon
  12. = fa_icon('check')
  13. .permissions-list__item__text
  14. .permissions-list__item__text__title
  15. = t(scope.key, scope: [:doorkeeper, :grouped_scopes, :title])
  16. .permissions-list__item__text__type
  17. = t(scope.access, scope: [:doorkeeper, :grouped_scopes, :access])
  18. .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. = button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
  26. = form_tag oauth_authorization_path, method: :delete do
  27. = hidden_field_tag :client_id, @pre_auth.client.uid
  28. = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
  29. = hidden_field_tag :state, @pre_auth.state
  30. = hidden_field_tag :response_type, @pre_auth.response_type
  31. = hidden_field_tag :scope, @pre_auth.scope
  32. = button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'