]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth2_authorizations/new.html.erb
00d2a01afdc4bf97cb0294605297ec095d3debe2
[rails.git] / app / views / oauth2_authorizations / new.html.erb
1 <% content_for :heading do %>
2   <h1><%= t ".title" %></h1>
3 <% end %>
4
5 <p><%= t ".introduction", :application => @pre_auth.client.name %></p>
6
7 <ul>
8   <% @pre_auth.scopes.each do |scope| -%>
9     <li><%= t "oauth.scopes.#{scope}" %></li>
10   <% end -%>
11 </ul>
12
13 <div class="container">
14   <div class="row justify-content-start">
15     <div class="col-auto pl-0">
16       <%= bootstrap_form_tag :action => :create do |f| %>
17         <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
18         <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
19         <%= f.hidden_field :state, :value => @pre_auth.state %>
20         <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
21         <%= f.hidden_field :scope, :value => @pre_auth.scope %>
22         <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
23         <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
24         <%= f.primary t(".authorize") %>
25       <% end %>
26     </div>
27     <div class="col-auto pl-0">
28       <%= bootstrap_form_tag :action => :destroy, :html => { :method => :delete } do |f| %>
29         <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
30         <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
31         <%= f.hidden_field :state, :value => @pre_auth.state %>
32         <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
33         <%= f.hidden_field :scope, :value => @pre_auth.scope %>
34         <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
35         <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
36         <%= f.submit t(".deny") %>
37       <% end %>
38     </div>
39   </div>
40 </div>