discourse/app/views/user_api_keys/new.html.erb
Sam 691f739f11 better error handling
push notifications imply read access, no need for a special permission
2016-08-23 16:48:00 +10:00

29 lines
832 B
Plaintext

<h1><%= t "user_api_key.title" %></h1>
<div>
<% 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 %>
<p>
<%= t("user_api_key.description", application_name: @application_name, access: @access_description) %>
</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 %>
<%= hidden_field_tag 'auth_redirect', @auth_redirect %>
<%= hidden_field_tag 'push_url', @push_url %>
<%= hidden_field_tag 'public_key', @public_key%>
<%= submit_tag t('user_api_key.authorize'), class: 'btn btn-danger' %>
<% end %>
</div>
<% end %>