<%= form_for @api_key, url: @api_key.new_record? ? new_admin_api_path(@api_key) : admin_api_path(@api_key), html: { class: "post" } do |f| %> <%= error_messages_for @api_key %>

* <%= ts("Required information") %>

<%= ts("API Token") %>

<%= ts("API Token") %>

<%= f.label :name, ts("Name") + "*" %>
<%= f.text_field :name %> <%= live_validation_for_field("api_key_name", :presence => true, :maximum_length => Profile::PROFILE_TITLE_MAX) %>
<%= f.check_box :banned %>
<%= f.label :banned, ts("Banned?") %>
<%= f.label :access_token, ts("Token (automatically generated)") %>
<%= f.text_field :access_token, readonly: true %>
<%= ts("Actions") %>

<%= ts("Actions") %>

<%= f.submit @api_key.new_record? ? ts("Create API Token") : ts("Update API Token") %>

<% end %>