<div class="module">
  <h1 class="head"><%= image_tag('24-member-add.png',{:border => 0}) %> Benutzer anlegen</h1>
  <div class="inner_module">

<% form_for(@user) do |f| %>
  <%= f.error_messages %>

  <table border="0">
    <tr><td>Benutzername:</td><td> <%= f.text_field :loginname %> </td></tr>
    <% if session[:user].is_admin? %>
      <tr><td>Benutzerrolle:</td><td> <%= f.select :team_id, Team.find(:all, :order => 'id').collect {|p| [p.name, p.id]} %> </td></tr>
      <tr><td>Benutzerverwaltungsrechte:</td><td> <%= admin_select(f) %> </td></tr>
    <% end %>
    <tr><td>Passwort:</td><td> <%= f.password_field :password %> </td></tr>
    <tr><td>Passwort bestätigen:</td><td> <%= f.password_field :password_confirmation %> </td></tr>
  </table>
      <p>
        <button type="submit">
          <%= image_tag('16-em-check.png',{:border => 0}) %>
        </button>
        <a href="<%= url_for :action => "index" %>">
          <button type="button">
            <%= image_tag('16-em-cross.png',{:border => 0}) %>
          </button>
        </a>
      </p>
    <% end %>
  </div>
</div>