scinote-web/app/views/doorkeeper/authorizations/new.html.erb

54 lines
2.3 KiB
Text
Raw Normal View History

<% provide(:head_title, t('doorkeeper.authorizations.new.head_title')) %>
2018-08-17 17:59:47 +08:00
<div class="center-block center-block-narrow doorkeeper-authorization">
<div class="row text-center">
<div class="doorkeeper-scinote-logo"></div>
</div>
2018-08-17 17:59:47 +08:00
<h3 class="text-justify">
<%= t('doorkeeper.authorizations.new.title', client_name: @pre_auth.client.name ) %>
</h3>
<br>
<div>
<h5>
<strong><%= @pre_auth.client.name %></strong>
<%= t('doorkeeper.authorizations.new.scopes_title') %>
</h5>
<ul>
<li><%= t('doorkeeper.authorizations.new.scope_1') %></li>
<li><%= t('doorkeeper.authorizations.new.scope_2') %></li>
</ul>
<h5>
<%= t('doorkeeper.authorizations.new.terms', client_name: @pre_auth.client.name) %>
</h5>
</div>
<br>
2018-08-17 17:59:47 +08:00
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right doorkeeper-actions-left">
<%= form_tag oauth_authorization_path, method: :delete do %>
2018-08-17 17:59:47 +08:00
<%= 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 %>
<%= hidden_field_tag :code_challenge, @pre_auth.code_challenge %>
<%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method %>
2023-06-19 21:45:22 +08:00
<%= submit_tag t('general.cancel'), class: "btn btn-secondary" %>
2018-08-17 17:59:47 +08:00
<% end %>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-left doorkeeper-actions-right">
<%= form_tag oauth_authorization_path, method: :post do %>
2018-08-17 17:59:47 +08:00
<%= 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 %>
<%= hidden_field_tag :code_challenge, @pre_auth.code_challenge %>
<%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method %>
<%= submit_tag t('doorkeeper.authorizations.buttons.authorize'), class: "btn btn-success" %>
2018-08-17 17:59:47 +08:00
<% end %>
</div>
</div>
2018-08-17 17:59:47 +08:00
</div>