2016-08-16 13:10:32 +08:00
|
|
|
<h1><%= t "user_api_key.title" %></h1>
|
2016-10-14 13:05:27 +08:00
|
|
|
<div class='authorize-api-key'>
|
2016-08-23 14:48:00 +08:00
|
|
|
<% if @no_trust_level %>
|
|
|
|
<h3>
|
|
|
|
<%= t("user_api_key.no_trust_level") %>
|
|
|
|
</h3>
|
|
|
|
<% elsif @generic_error %>
|
|
|
|
<h3>
|
|
|
|
<%= t("user_api_key.generic_error") %>
|
|
|
|
</h3>
|
|
|
|
<% else %>
|
2016-08-16 13:10:32 +08:00
|
|
|
<p>
|
2016-10-14 13:05:27 +08:00
|
|
|
<%= t("user_api_key.description", application_name: @application_name) %>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<ul class='scopes'>
|
|
|
|
<%- @localized_scopes.each do |scope| %>
|
|
|
|
<li><%= scope %></li>
|
|
|
|
<%- end %>
|
|
|
|
</ul>
|
2016-08-16 13:10:32 +08:00
|
|
|
</p>
|
|
|
|
<%= form_tag(user_api_key_path) do %>
|
|
|
|
<%= hidden_field_tag 'application_name', @application_name %>
|
|
|
|
<%= hidden_field_tag 'access', @access %>
|
|
|
|
<%= hidden_field_tag 'nonce', @nonce %>
|
|
|
|
<%= hidden_field_tag 'client_id', @client_id %>
|
2019-01-04 11:46:18 +08:00
|
|
|
<%= hidden_field_tag('auth_redirect', @auth_redirect) if @auth_redirect %>
|
2016-08-16 13:10:32 +08:00
|
|
|
<%= hidden_field_tag 'push_url', @push_url %>
|
|
|
|
<%= hidden_field_tag 'public_key', @public_key%>
|
2016-10-14 13:05:27 +08:00
|
|
|
<%= hidden_field_tag 'scopes', @scopes%>
|
2018-10-25 21:52:01 +08:00
|
|
|
<%= submit_tag t('user_api_key.authorize'), class: 'btn btn-danger' %>
|
2016-08-16 13:10:32 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2016-08-23 14:48:00 +08:00
|
|
|
<% end %>
|
2016-08-16 13:10:32 +08:00
|
|
|
|
|
|
|
|