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.rhtml @ 825:48af1a50d2c8

History | View | Annotate | Download (2.62 KB)

1
<%= javascript_include_tag "ssamr_institutions" %>
2

    
3
<div class="contextual">
4
<%= link_to(l(:button_change_password), :action => 'password') if @user.change_password_allowed? %>
5
<%= call_hook(:view_my_account_contextual, :user => @user)%>
6
</div>
7
<h2><%=l(:label_my_account)%></h2>
8
<%= error_messages_for 'user' %>
9

    
10
<% form_for :user, @user, :url => { :action => "account" }, 
11
                          :builder => TabularFormBuilder, 
12
                          :lang => current_language,
13
                          :html => { :id => 'my_account_form' } do |f| %>
14

    
15

    
16
<div class="splitcontentleft">
17
<h3><%=l(:label_information_plural)%></h3>
18
<div class="box tabular">
19
<p><%= f.text_field :firstname, :required => true %></p>
20
<p><%= f.text_field :lastname, :required => true %></p>
21
<p><%= f.text_field :mail, :required => true %></p>
22
<p><%= f.select :language, lang_options_for_select %></p>
23
<% if Setting.openid? %>
24
<p><%= f.text_field :identity_url  %></p>
25
<% end %>
26

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

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

    
34
<h3><%=l(:label_ssamr_details)%></h3>
35
<div class="box tabular">
36
    <% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %>
37
       <p>
38
         <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %>
39
       </p>
40

    
41

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

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

    
58

    
59
<%= submit_tag l(:button_save) %>
60
</div>
61

    
62
<div class="splitcontentright">
63
<h3><%=l(:field_mail_notification)%></h3>
64
<div class="box">
65
<%= render :partial => 'users/mail_notifications' %>
66
</div>
67

    
68
<h3><%=l(:label_preferences)%></h3>
69
<div class="box tabular">
70
<%= render :partial => 'users/preferences' %>
71
</div>
72

    
73
</div>
74
<% end %>
75

    
76

    
77

    
78

    
79

    
80

    
81

    
82

    
83

    
84
<% content_for :sidebar do %>
85
<%= render :partial => 'sidebar' %>
86
<% end %>
87

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