<%= error_messages_for 'user' %>

<%= f.text_field :login, :required => true, :size => 25 %>

<%= f.text_field :firstname, :required => true %>

<%= f.text_field :lastname, :required => true %>

<%= f.text_field :mail, :required => true %>

<%= f.select :language, lang_options_for_select %>

<% if Setting.openid? %>

<%= f.text_field :identity_url %>

<% end %> <% @user.custom_field_values.each do |value| %>

<%= custom_field_tag_with_label :user, value %>

<% end %>

<%= f.check_box :admin, :disabled => (@user == User.current) %>

<%= call_hook(:view_users_form, :user => @user, :form => f) %>

<%=l(:label_authentication)%>

<% unless @auth_sources.empty? %>

<%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %>

<% end %>

<%= password_field_tag 'password', nil, :size => 25 %>
<%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>

<%= password_field_tag 'password_confirmation', nil, :size => 25 %>