闭社主体 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.

26 lines
1.2 KiB

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