闭社主体 forked from https://github.com/tootsuite/mastodon
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.

25 lines
1.2 KiB

  1. - content_for :page_title do
  2. = t('doorkeeper.authorizations.new.title')
  3. .oauth-prompt
  4. %h2= t('doorkeeper.authorizations.new.prompt', client_name: @pre_auth.client.name)
  5. %p
  6. = t('doorkeeper.authorizations.new.able_to')
  7. = @pre_auth.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.map { |s| "<strong>#{s}</strong>"}.to_sentence.html_safe
  8. = form_tag oauth_authorization_path, method: :post, class: 'simple_form' do
  9. = hidden_field_tag :client_id, @pre_auth.client.uid
  10. = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
  11. = hidden_field_tag :state, @pre_auth.state
  12. = hidden_field_tag :response_type, @pre_auth.response_type
  13. = hidden_field_tag :scope, @pre_auth.scope
  14. = button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
  15. = form_tag oauth_authorization_path, method: :delete, class: 'simple_form' do
  16. = hidden_field_tag :client_id, @pre_auth.client.uid
  17. = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
  18. = hidden_field_tag :state, @pre_auth.state
  19. = hidden_field_tag :response_type, @pre_auth.response_type
  20. = hidden_field_tag :scope, @pre_auth.scope
  21. = button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'