obsolete.ChilliProject/app/views/my/account.rhtml

42 lines
1.7 KiB
Plaintext
Raw Normal View History

<div class="contextual">
<%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %>
</div>
<h2><%=l(:label_my_account)%></h2>
<%= error_messages_for 'user' %>
<% form_for :user, @user, :url => { :action => "account" }, :builder => TabularFormBuilder, :lang => current_language do |f| %>
<div class="splitcontentleft">
<h3><%=l(:label_information_plural)%></h3>
<div class="box tabular">
<p><%= f.text_field :firstname, :required => true %></p>
<p><%= f.text_field :lastname, :required => true %></p>
<p><%= f.text_field :mail, :required => true %></p>
<p><%= f.select :language, lang_options_for_select %></p>
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
<p><%= pref_fields.check_box :hide_mail %></p>
<% end %>
</div>
<%= submit_tag l(:button_save) %>
</div>
<div class="splitcontentright">
<h3><%=l(:field_mail_notification)%></h3>
<div class="box">
<%= 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 %>
<p><% User.current.projects.each do |project| %>
<label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%= project.name %></label><br />
<% end %></p>
<p><em><%= l(:text_user_mail_option) %></em></p>
<% end %>
</div>
</div>
<% end %>
<% content_for :sidebar do %>
<%= render :partial => 'sidebar' %>
<% end %>