<% #
 # This file is part of the Anotatornia suite.
 # 
 # Copyright © 2007, 2008, 2009, 2010 by Instytut Podstaw Informatyki
 # Polskiej Akademii Nauk (IPI PAN; Institute of Computer Science, Polish
 # Academy of Sciences; cf. www.ipipan.waw.pl).  All rights reserved.
 # 
 # This file may be distributed and/or modified under the terms of the
 # GNU General Public License version 3 as published by the Free Software
 # Foundation and appearing in the file COPYING included in the packaging
 # of this file.  (See http://www.gnu.org/licenses/translations.html for
 # unofficial translations.)
 # 
 # A commercial license is available from IPI PAN (contact
 # Michal.Ciesiolka.waw.pl or ipi.waw.pl for more
 # information).  Licensees holding a valid commercial license from IPI
 # PAN may use this file in accordance with that license.
 # 
 # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
 # THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 # PURPOSE.
%>

<h1>Logowanie#dodaj_uzytkownika</h1>
<p>(Jestem w: app/views/logowanie/dodaj_uzytkownika.rhtml)</p>
<div class="depot-form" >
  <%= error_messages_for 'uzytkownik' %>
  <fieldset>
    <legend>Wprowadź dane użytkownika</legend>
    <% form_for :uzytkownik do |form| %>
    <p>
      <label for="uzytkownik_rola_id" >Rola:</label>
      <br/>     
      <%= 
	 form.select :rola_id,
	       (Rola.find(:all, :order => :rola_id)).collect {|rola|
      [rola[:opis], rola[:rola_id]]      
    },
	 :prompt => "Wskaż rolę użytkownika"
      %>	
    </p>
    <p>
      <label for="uzytkownik_login" >Login:</label>
      <br/>   
		 <%= form.text_field :login, :size => 40 %>
    </p>
    <p>
      <label for="uzytkownik_haslo" >Hasło:</label>
      <br/>     
		 <%= form.password_field :haslo, :size => 40 %>
    </p>
    <p>
      <label for="uzytkownik_haslo_confirmation" >Powtórz hasło:</label>
      <br/>   
		 <%= form.password_field :haslo_confirmation, :size => 40 %>
    </p>
    <p>
      <label for="uzytkownik_imie" >Imię użytkownika:</label>
      <br/>     
		 <%= form.text_field :imie, :size => 40 %>
    </p>
    <p>
      <label for="uzytkownik_nazwisko" >Nazwisko użytkownika:</label>
      <br/>   
		 <%= form.text_field :nazwisko, :size => 40 %>
    </p>
    <p>
      <label for="uzytkownik_email" >email użytkownika:</label>
      <br/>   
		 <%= form.text_field :email, :size => 40 %>
    </p>
    <%= submit_tag "Dodaj użytkownika" , :class => "submit" %>
    <% end %>
  </fieldset>
</div>
