<%= link_to(l(:button_change_password), :action => 'password') if @user.change_password_allowed? %> <%= call_hook(:view_my_account_contextual, :user => @user)%>

<%=l(:label_my_account)%>

<%= error_messages_for 'user' %> <% form_for :user, @user, :url => { :action => "account" }, :builder => TabularFormBuilder, :lang => current_language, :html => { :id => 'my_account_form' } do |f| %>

<%=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 %>

<% if Setting.openid? %>

<%= f.text_field :identity_url %>

<% end %> <% @user.custom_field_values.select(&:editable?).each do |value| %>

<%= custom_field_tag_with_label :user, value %>

<% end %> <%= call_hook(:view_my_account, :user => @user, :form => f) %>
<%= submit_tag l(:button_save) %>

<%=l(:field_mail_notification)%>

<%= select_tag 'notification_option', options_for_select(@notification_options.collect {|o| [l(o.last), o.first]}, @notification_option.to_sym), :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, ActiveSupport::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)) -%>