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

94 lines
3.2 KiB
Plaintext
Raw Normal View History

2013-08-01 10:33:49 +08:00
<div class="contextual" style="padding-right: 10px;">
<%= call_hook(:view_my_account_contextual, :user => @user)%>
</div>
<h3 style="padding-left: 10px;"><%= l(:label_my_account)%></h3>
2013-08-01 10:33:49 +08:00
<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-->
</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>
<p style="width:400px;">
<%= f.text_field :mail, :required => true %>
</p>
<p style="width:413px;padding-left:36px;>
<%= 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>
<!--Added by young-->
<div>
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%=l(:label_authentication)%></legend> <!-- add by huang -->
<div>
<p style="width:400px;padding-left: 26px;"><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
2013-08-01 10:33:49 +08:00
<p style="width:400px;padding-left: 13px;"><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
<%= password_field_tag 'new_password', nil, :size => 25 %>
<em class="info" style="width:400px;padding-left: 52px;"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
2013-08-01 10:33:49 +08:00
<p style="width:400px;padding-left: 26px;"><label for="new_password_confirmation"><%=l(:field_password_confirmation)%><span class="required">*</span></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
</div>
</fieldset>
<!--Ended by young-->
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>
<%= submit_tag l(:button_save) %>
</fieldset>
<% end %>
<%= error_messages_for 'user' %>
<% html_title(l(:label_my_account)) -%>