<%= form_for(@user, :url => {:action => :update_role, :id => @user.id}) do |f| %>
<div class="form-abfrage user-edit">
  <!-- f.error_messages -->
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2>Fehler:</h2>
      <ul>
         <% @user.errors.full_messages.each { |msg| %>
            <li><%= msg %>
         <% } %>
      </ul>
    </div>
  <% end %>

  <table border="0" class="form--setting">
    <tr>
      <td>Benutzerrolle</td>
      <td><%= f.select :team_id, Team.order(:id).select('name,id').to_a.collect {|p| [p.name, p.id]} %> </td>
    </tr>
    <tr>
      <td>Benutzerverwaltungsrechte</td>
      <td><%= admin_select(f) %> </td>
    </tr>
  </table>

  <div class="from--submit">
  <%= link_to({ :action => 'index'}) do %>
      <i class="fa fa-times" aria-hidden="true"></i>
  <% end %>

    <button type="submit">
      <i class="fa fa-check" aria-hidden="true"></i>
    </button>
  </div>
</div>
<% end %>
