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 / users / _form.rhtml @ 443:350acce374a2

History | View | Annotate | Download (2.9 KB)

1
<%= javascript_include_tag "ssamr_institutions" %>
2

    
3

    
4
<%= error_messages_for 'user' %>
5

    
6
<div id="user_form">
7
<!--[form:user]-->
8
<div class="splitcontentleft">
9
<h3><%=l(:label_information_plural)%></h3>
10
<div class="box tabular">
11
<p><%= f.text_field :login, :required => true, :size => 25  %></p>
12
<p><%= f.text_field :firstname, :required => true %></p>
13
<p><%= f.text_field :lastname, :required => true %></p>
14
<p><%= f.text_field :mail, :required => true %></p>
15
<p><%= f.select :language, lang_options_for_select %></p>
16
<% if Setting.openid? %>
17
<p><%= f.text_field :identity_url  %></p>
18
<% end %>
19

    
20
<% @user.custom_field_values.each do |value| %>
21
        <p><%= custom_field_tag_with_label :user, value %></p>
22
<% end %>
23

    
24
<p><%= f.check_box :admin, :disabled => (@user == User.current) %></p>
25
<%= call_hook(:view_users_form, :user => @user, :form => f) %>
26
</div>
27

    
28
<div class="box tabular">
29
        <h3><%=l(:label_ssamr_details)%></h3>
30
          <% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %>
31
            <p>
32
              <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit'  %>                            
33
            </p>
34

    
35
            <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
36
                         <nobr>
37
              <%= ssamr_user_detail.radio_button :institution_type, true %>
38
              <%= ssamr_user_detail.collection_select(:institution_id, Institution.find(:all, :order => "institutions.order"), :id, :name, {:selected => @selected_institution_id, :prompt => true} ).gsub('&amp;', '&')  %>
39
             </nobr>
40
                        </p>
41

    
42

    
43

    
44
            <p>
45
                                <nobr>
46
               <%= ssamr_user_detail.radio_button :institution_type, false %> Other:
47
               <%= ssamr_user_detail.text_field :other_institution %>
48
                                </nobr>
49
            </p>
50
          <% end %>
51
</div>
52

    
53

    
54

    
55
<h3><%=l(:label_authentication)%></h3>
56
<div class="box tabular">
57
<% unless @auth_sources.empty? %>
58
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p>
59
<% end %>
60
<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
61
<p><%= f.password_field :password, :required => true, :size => 25  %><br />
62
<em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
63
<p><%= f.password_field :password_confirmation, :required => true, :size => 25  %></p>
64
</div>
65
</div>
66
</div>
67

    
68
<div class="splitcontentright">
69
<h3><%=l(:field_mail_notification)%></h3>
70
<div class="box">
71
<%= render :partial => 'users/mail_notifications' %>
72
</div>
73

    
74
<h3><%=l(:label_preferences)%></h3>
75
<div class="box tabular">
76
<%= render :partial => 'users/preferences' %>
77
</div>
78
</div>
79
</div>
80
<div style="clear:left;"></div>
81
<!--[eoform:user]-->