<%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %>
<%=l(:label_information_plural)%>
<%= 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 %>
<%= submit_tag l(:button_save) %>
<%=l(:field_mail_notification)%>
<%= select_tag 'notification_option', options_for_select(@notification_options, @notification_option),
:onchange => 'if ($("notification_option").value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}' %>
<% content_tag 'div', :id => 'notified-projects', :style => (@notification_option == 'selected' ? '' : 'display:none;') do %>
<% User.current.projects.each do |project| %>
<% end %>
<%= l(:text_user_mail_option) %>
<% end %>
<%=l(:label_preferences)%>
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
<%= pref_fields.check_box :hide_mail %>
<%= pref_fields.select :time_zone, TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %>
<%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %>
<% end %>
<% end %>
<% content_for :sidebar do %>
<%= render :partial => 'sidebar' %>
<% end %>
<% html_title(l(:label_my_account)) -%>