2016-11-15 22:56:03 +00:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('doorkeeper.authorizations.new.title')
|
|
|
|
|
2016-10-22 17:38:47 +00:00
|
|
|
.oauth-prompt
|
2016-11-18 22:08:52 +00:00
|
|
|
%h2= t('doorkeeper.authorizations.new.prompt', client_name: @pre_auth.client.name)
|
2016-10-22 17:38:47 +00:00
|
|
|
|
|
|
|
%p
|
2016-11-15 22:56:03 +00:00
|
|
|
= t('doorkeeper.authorizations.new.able_to')
|
2016-10-22 17:38:47 +00:00
|
|
|
= @pre_auth.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.map { |s| "<strong>#{s}</strong>"}.to_sentence.html_safe
|
|
|
|
|
|
|
|
= form_tag oauth_authorization_path, method: :post, class: 'simple_form' do
|
|
|
|
= hidden_field_tag :client_id, @pre_auth.client.uid
|
|
|
|
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
|
|
|
|
= hidden_field_tag :state, @pre_auth.state
|
|
|
|
= hidden_field_tag :response_type, @pre_auth.response_type
|
|
|
|
= hidden_field_tag :scope, @pre_auth.scope
|
|
|
|
= button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
|
|
|
|
|
|
|
|
= form_tag oauth_authorization_path, method: :delete, class: 'simple_form' do
|
|
|
|
= hidden_field_tag :client_id, @pre_auth.client.uid
|
|
|
|
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
|
|
|
|
= hidden_field_tag :state, @pre_auth.state
|
|
|
|
= hidden_field_tag :response_type, @pre_auth.response_type
|
|
|
|
= hidden_field_tag :scope, @pre_auth.scope
|
|
|
|
= button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'
|