<%- unless @supported_permission.errors.empty? -%>
  <div class="alert alert-danger add-top-margin">
    <ul class="errors">
      <%- @supported_permission.errors.full_messages.each do |msg| -%>
      <li><%= msg %></li>
      <%- end -%>
    </ul>
  </div>
<%- end -%>

<div class="well">
  <%= form_for [:superadmin, @application, @supported_permission] do |f| %>
    <div class="form-group">
      <%= f.label :name, 'Permission name' %>
        <% if f.object.name.try(:downcase) == 'signin' %>
          <%= f.object.name %>
        <% else %>
          <%= f.text_field :name, placeholder: t('supported_permissions.form.placeholder.name'), class: 'form-control input-md-4' %>
        <% end %>
    </div>
    <hr />
    <p class="form-group checkbox">
      <%= f.label :delegatable, t('supported_permissions.form.delegatable') %>
      <%= f.check_box :delegatable %>
    </p>
    <hr />
    <%= f.submit "Save permission", class: "btn btn-success" %>
  <% end %>
</div>

<%- unless @supported_permission.errors.empty? -%>
  <div class="alert alert-danger add-top-margin">
    <ul class="errors">
      <%- @supported_permission.errors.full_messages.each do |msg| -%>
      <li><%= msg %></li>
      <%- end -%>
    </ul>
  </div>
<%- end -%>

<div class="well">
  <%= form_for [:superadmin, @application, @supported_permission] do |f| %>
    <div class="form-group">
      <%= f.label :name, 'Permission name' %>
        <% if f.object.name.try(:downcase) == 'signin' %>
          <%= f.object.name %>
        <% else %>
          <%= f.text_field :name, placeholder: t('supported_permissions.form.placeholder.name'), class: 'form-control input-md-4', autofocus: 'autofocus' %>
        <% end %>
    </div>
    <hr />
    <p class="form-group checkbox">
      <%= f.label :delegatable, t('supported_permissions.form.delegatable') %>
      <%= f.check_box :delegatable %>
    </p>
    <hr />
    <%= f.submit "Save permission", class: "btn btn-success" %>
  <% end %>
</div>

Set autofocus on input field
Set autofocus on input field

As a superadmin
When I am adding a new permission
I would like the focus to be on the input field
So that I can start to type without tabbing or clicking