31 lines
1.5 KiB
Plaintext
31 lines
1.5 KiB
Plaintext
|
<% content_for(:page_title) do %>
|
||
|
YiffyAPI - Create API Key
|
||
|
<% end %>
|
||
|
|
||
|
<%= render partial: "yiff_rest/home/head" %>
|
||
|
<%= render partial: "nav" %>
|
||
|
|
||
|
<div class="w-100">
|
||
|
<div style="width: 40%; margin-left: 30%;">
|
||
|
<%= simple_form_for(@apikey, url: yiff_rest_apikeys_path, method: :post) do |f| %>
|
||
|
<%= f.input(:application_name, label: "Application Name", placeholder: "The name of your application.", required: true) %>
|
||
|
<%= f.input(:usage, placeholder: "What you plan to do with your apikey.", required: true) %>
|
||
|
<% if CurrentUser.is_admin? %>
|
||
|
<%= f.input(:limit_long, input_html: { min: 0 }, label: "Limit (Long)") %>
|
||
|
<%= f.input(:window_long, input_html: { min: 0 }, label: "Window (Long)") %>
|
||
|
<%= f.input(:limit_short, input_html: { min: 0 }, label: "Limit (Short)") %>
|
||
|
<%= f.input(:window_short, input_html: { min: 0 }, label: "Window (Short)") %>
|
||
|
<%= f.input(:bulk_limit, input_html: { min: 0 }, label: "Bulk Limit") %>
|
||
|
<%= f.input(:owner_id, label: "Owner ID") %>
|
||
|
<div class="text-start" style="margin-left: 35%;">
|
||
|
<%= f.input(:flags_images, as: :boolean, label: "Images Access Flag") %>
|
||
|
<%= f.input(:flags_thumbs, as: :boolean, label: "Thumbs Access Flag") %>
|
||
|
<%= f.input(:flags_shortener, as: :boolean, label: "Shortener Access Flag") %>
|
||
|
<%= f.input(:flags_images_bulk, as: :boolean, label: "Images Bulk Access Flag") %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<%= f.button(:submit, name: nil, label: "Create API Key") %>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
</div>
|