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

88 lines
3.1 KiB
Plaintext

<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>
<fieldset class="box" style="margin:10px;">
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:label_my_photo)%>
</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| %>
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:label_information_plural)%>
</legend>
<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>
<% 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-->
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend><%=l(:label_authentication)%></legend>
<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>
<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>
<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>
</fieldset>
<!--Ended by young-->
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:field_mail_notification)%>
</legend>
<p style="width:380px;>
<%= render :partial => 'users/mail_notifications' %>
</p>
</fieldset>
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
<legend onclick="toggleFieldset(this);">
<%= l(:label_preferences)%>
</legend>
<%= render :partial => 'users/preferences' %>
</fieldset>
<%= submit_tag l(:button_save) %>
</fieldset>
<% end %>
<%= error_messages_for 'user' %>
<% html_title(l(:label_my_account)) -%>