about summary refs log tree commit diff
path: root/app/views/oauth/authorizations/new.html.haml
blob: 50f671b26f7fd1b076fb0869a97a827b811fe60a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- content_for :page_title do
  = t('doorkeeper.authorizations.new.title')

.form-container.simple_form
  .oauth-prompt
    %h3= t('doorkeeper.authorizations.new.title')

    %p= t('doorkeeper.authorizations.new.prompt_html', client_name: content_tag(:strong, @pre_auth.client.name))

    %h3= t('doorkeeper.authorizations.new.review_permissions')

    %ul.permissions-list
      - grouped_scopes(@pre_auth.scopes).each do |scope|
        %li.permissions-list__item
          .permissions-list__item__icon
            = fa_icon('check')
          .permissions-list__item__text
            .permissions-list__item__text__title
              = t(scope.key, scope: [:doorkeeper, :grouped_scopes, :title])
            .permissions-list__item__text__type
              = t(scope.access, scope: [:doorkeeper, :grouped_scopes, :access])

    .actions
      = form_tag oauth_authorization_path, method: :post 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 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'