<div class="module">
  <h1 class="head">Benutzerrolle ändern für <%= @user.loginname %> </h1>
  <div class="inner_module">

<%= form_for(@user, :url => {:action => :update_role, :id => @user.id}) do |f| %>
  <!-- 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">
    <tr><td>Benutzerrolle:</td><td> <%= f.select :team_id, Team.find(:all, :order => 'id').collect {|p| [p.name, p.id]} %> </td></tr>
  </table>
      <p>
        <button type="submit">
          <%= image_tag('16-em-check.png',{:border => 0}) %>
        </button>
        <button type="button" onclick="window.location='<%= url_for :action => "index" %>'">
          <%= image_tag('16-em-cross.png',{:border => 0}) %>
        </button>
      </p>
    <% end %>
  </div>
</div>
