To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / my / account.html.erb @ 1298:4f746d8966dd

History | View | Annotate | Download (2.6 KB)

1
<%= javascript_include_tag "ssamr_institutions" %>
2

    
3
<div class="contextual">
4
<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
5
<%= call_hook(:view_my_account_contextual, :user => @user)%>
6
</div>
7

    
8
<h2><%=l(:label_my_account)%></h2>
9
<%= error_messages_for 'user' %>
10

    
11
<%= labelled_form_for :user, @user,
12
                     :url => { :action => "account" },
13
                     :html => { :id => 'my_account_form',
14
                                :method => :post } do |f| %>
15
<div class="splitcontentleft">
16
<fieldset class="box tabular">
17
  <legend><%=l(:label_information_plural)%></legend>
18
  <p><%= f.text_field :firstname, :required => true %></p>
19
  <p><%= f.text_field :lastname, :required => true %></p>
20
  <p><%= f.text_field :mail, :required => true %></p>
21
  <p><%= f.select :language, lang_options_for_select %></p>
22
  <% if Setting.openid? %>
23
  <p><%= f.text_field :identity_url  %></p>
24
  <% end %>
25

    
26
  <% @user.custom_field_values.select(&:editable?).each do |value| %>
27
    <p><%= custom_field_tag_with_label :user, value %></p>
28
  <% end %>
29

    
30
  <%= call_hook(:view_my_account, :user => @user, :form => f) %>
31
</fieldset>
32

    
33
<%= labelled_fields_for :ssamr_user_details, @user.ssamr_user_detail do |fields| %>
34
<h3><%=l(:label_ssamr_details)%></h3>
35
<div class="box tabular">
36
       <p>
37
         <%= fields.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %>
38
       </p>
39

    
40
            <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
41
                        <nobr>
42
              <%= fields.radio_button :institution_type, true %>
43
              <%= fields.collection_select(:institution_id, Institution.find(:all, :order => "institutions.order"), :id, :name, {:selected => @selected_institution_id, :prompt => true} ).gsub('&amp;', '&').html_safe %>
44
            </nobr>
45
                        </p>
46

    
47
            <p>
48
                                <nobr>
49
                               <%= fields.radio_button :institution_type, false %> Other:
50
                               <%= fields.text_field :other_institution, :size => 19 %>
51
                    </nobr>
52
            </p>
53
</div>
54
<% end %>
55

    
56
<%= submit_tag l(:button_save) %>
57
</div>
58

    
59
<div class="splitcontentright">
60
<fieldset class="box">
61
  <legend><%=l(:field_mail_notification)%></legend>
62
  <%= render :partial => 'users/mail_notifications' %>
63
</fieldset>
64

    
65
<fieldset class="box tabular">
66
  <legend><%=l(:label_preferences)%></legend>
67
  <%= render :partial => 'users/preferences' %>
68
</fieldset>
69

    
70
</div>
71
<% end %>
72

    
73
<% content_for :sidebar do %>
74
<%= render :partial => 'sidebar' %>
75
<% end %>
76

    
77
<% html_title(l(:label_my_account)) -%>