<div class="grid_9 center">

<%= simple_form_for(@user) do |f| %>
  <%= action_links do %>
    <%= f.button :submit %>
    ou <%= link_to "Retourner à la liste", users_path %>
  <% end %>

  <table class="show_item">
    <tbody>
      <%= tabular_errors @user %>
      <%= f.input :name, :required => true, :wrapper_class => "th" %>
      <%= f.input :provider, :collection => [["Cerbère CAS", "cas"]] %>
      <%= f.input :uid, :required => true, :input_html => { :style => "width:400px;" } %>
      <tr>
        <td class="label"><%= f.label :authentication_token, :class => "input" %></td>
        <td>
          <span id="authentication_token"><%= @user.authentication_token %></span>
          <%= f.hidden_field :authentication_token %>
          <%= button_tag "Générer", :id => "generate-token", :class => "inline", :style => (@user.authentication_token.present? ? "display:none;" : nil) %>
          <%= button_tag "Supprimer", :id => "remove-token", :class => "inline", :style => (@user.authentication_token.blank? ? "display:none;" : nil) %>
        </td>
      </tr>
    </tbody>
  </table>
<% end %>

</div>

<div class="grid_9 center">

<%= simple_form_for(@user) do |f| %>
  <%= action_links do %>
    <%= f.button :submit %>
    ou <%= link_to "Retourner à la liste", users_path %>
  <% end %>

  <table class="show_item">
    <tbody>
      <%= tabular_errors @user %>
      <%= f.input :name, :required => true, :wrapper_class => "th" %>
      <%= f.input :provider, :collection => [["Cerbère CAS", "cas"]] %>
      <%= f.input :uid, :required => true, :input_html => { :style => "width:400px;" } %>
      <tr>
        <td class="label"><%= f.label :authentication_token, :class => "input" %></td>
        <td>
          <span id="authentication_token"><%= @user.authentication_token %></span>
          <%= f.hidden_field :authentication_token %>
          <%= button_tag "Générer", :id => "generate-token", :class => "inline", :style => (@user.authentication_token.present? ? "display:none;" : nil) %>
          <%= button_tag "Supprimer", :id => "remove-token", :class => "inline", :style => (@user.authentication_token.blank? ? "display:none;" : nil),
                                      "data-confirm" => t(:text_are_you_sure) %>
        </td>
      </tr>
    </tbody>
  </table>
<% end %>

</div>

Add confirmation message before token deletion in users/form
Add confirmation message before token deletion in users/form
