socialforge/app/views/my/account.html.erb

84 lines
2.6 KiB
Plaintext
Raw Normal View History

<div class="contextual" style="padding-right: 10px;">
2013-08-13 00:22:45 +08:00
<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
2013-08-01 10:33:49 +08:00
<%= call_hook(:view_my_account_contextual, :user => @user)%>
</div>
<h3 style="padding-left: 10px;"><%= l(:label_my_account)%></h3>
<fieldset class="box" style="margin:10px;">
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:label_my_photo)%>
2013-08-01 10:33:49 +08:00
</legend>
<div>
<!--upload profiles-->
<%= render :partial=> "avatar/avatar_form", :locals=>{source:@user} %>
<!--upload-->
2013-08-01 10:33:49 +08:00
</div>
</fieldset>
<%= labelled_form_for :user, @user,
:url => { :action => "account" },
:html => { :id => 'my_account_form',
:method => :post } do |f| %>
2013-08-01 10:33:49 +08:00
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:label_information_plural)%>
</legend>
<div>
2013-08-01 10:33:49 +08:00
<p style="width:400px;padding-left: 26px;">
<%= f.text_field :firstname, :required => true %>
</p>
<p style="width:400px;padding-left: 26px;">
<%= f.text_field :lastname, :required => true %>
</p>
2013-08-13 17:11:54 +08:00
<p style="width:357px;padding-left: 26px;">
2013-08-01 10:33:49 +08:00
<%= f.text_field :mail, :required => true %>
</p>
2013-08-13 17:11:54 +08:00
<p style="width:426px;padding-left:26px;>
2013-08-01 10:33:49 +08:00
<%= f.select :language, lang_options_for_select %>
</p>
<% if Setting.openid? %>
<p>
<%= f.text_field :identity_url %>
</p></div>
2013-08-01 10:33:49 +08:00
<% end %>
<% @user.custom_field_values.select(&:editable?).each do |value| %>
<p>
<%= custom_field_tag_with_label :user, value %>
</p>
<% end %>
<%= call_hook(:view_my_account, :user => @user, :form => f) %>
</fieldset>
2013-08-13 00:22:45 +08:00
2013-08-01 10:33:49 +08:00
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:field_mail_notification)%>
</legend>
<div>
2013-08-01 10:33:49 +08:00
<p style="width:380px;>
<%= render :partial => 'users/mail_notifications' %>
</p></div>
2013-08-01 10:33:49 +08:00
</fieldset>
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:label_preferences)%>
</legend>
<div>
<%= render :partial => 'users/preferences' %></div>
2013-08-01 10:33:49 +08:00
</fieldset>
2013-08-19 17:28:59 +08:00
<!-- added by william -->
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;display: none">
2013-08-19 17:28:59 +08:00
<legend onclick="toggleFieldset(this);">
<%= l(:label_user_extensions)%>
</legend>
<div>
<%= render :partial => 'users/user_extensions' %></div>
</fieldset>
<!-- end -->
2013-08-01 10:33:49 +08:00
<%= submit_tag l(:button_save) %>
</fieldset>
<% end %>
<% html_title(l(:label_my_account)) -%>