]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth2_authorizations/new.html.erb
Rework some of the OAuth2 views, adding links and messages when there are no applicat...
[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="row justify-content-start no-gutters mx-n1">
14   <div class="col-auto mx-1">
15     <%= bootstrap_form_tag :action => :create do |f| %>
16       <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
17       <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
18       <%= f.hidden_field :state, :value => @pre_auth.state %>
19       <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
20       <%= f.hidden_field :scope, :value => @pre_auth.scope %>
21       <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
22       <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
23       <%= f.primary t(".authorize") %>
24     <% end %>
25   </div>
26   <div class="col-auto mx-1">
27     <%= bootstrap_form_tag :action => :destroy, :html => { :method => :delete } do |f| %>
28       <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
29       <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
30       <%= f.hidden_field :state, :value => @pre_auth.state %>
31       <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
32       <%= f.hidden_field :scope, :value => @pre_auth.scope %>
33       <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
34       <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
35       <%= f.submit t(".deny") %>
36     <% end %>
37   </div>
38 </div>