To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / users / _form.html.erb @ 1298:4f746d8966dd
History | View | Annotate | Download (2.99 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 |
<fieldset class="box tabular"> |
| 10 |
<legend><%=l(:label_information_plural)%></legend> |
| 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 |
</fieldset>
|
| 27 |
|
| 28 |
<div class="box tabular"> |
| 29 |
<h3><%=l(:label_ssamr_details)%></h3> |
| 30 |
<%= labelled_fields_for :ssamr_user_details 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('&', '&').html_safe %>
|
| 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 |
<fieldset class="box tabular"> |
| 56 |
<legend><%=l(:label_authentication)%></legend> |
| 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=='') {$('#password_fields').show();} else {$('#password_fields').hide();}" %></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 %> |
| 62 |
<em class="info"><%= 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 |
</fieldset>
|
| 66 |
</div>
|
| 67 |
|
| 68 |
<div class="splitcontentright"> |
| 69 |
<fieldset class="box"> |
| 70 |
<legend><%=l(:field_mail_notification)%></legend> |
| 71 |
<%= render :partial => 'users/mail_notifications' %>
|
| 72 |
</fieldset>
|
| 73 |
|
| 74 |
<fieldset class="box tabular"> |
| 75 |
<legend><%=l(:label_preferences)%></legend> |
| 76 |
<%= render :partial => 'users/preferences' %>
|
| 77 |
</fieldset>
|
| 78 |
</div>
|
| 79 |
</div>
|
| 80 |
<div style="clear:left;"></div> |
| 81 |
<!--[eoform:user]-->
|