comparison app/views/my/account.html.erb @ 1235:775d89567f41 redmine-2.2-integration

Converting fields_for ... :builder => TabularFormBuilder to labelled_fields_for seems like the thing to do
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 14 Mar 2013 12:16:26 +0000
parents bb32da3bea34
children 51364c0cd58f
comparison
equal deleted inserted replaced
1234:e0167f4e1d8a 1235:775d89567f41
28 <% end %> 28 <% end %>
29 29
30 <%= call_hook(:view_my_account, :user => @user, :form => f) %> 30 <%= call_hook(:view_my_account, :user => @user, :form => f) %>
31 </fieldset> 31 </fieldset>
32 32
33 <%= labelled_fields_for :ssamr_user_details, @user.ssamr_user_detail do |fields| %>
33 <h3><%=l(:label_ssamr_details)%></h3> 34 <h3><%=l(:label_ssamr_details)%></h3>
34 <div class="box tabular"> 35 <div class="box tabular">
35 <% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %>
36 <p> 36 <p>
37 <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %> 37 <%= fields.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %>
38 </p> 38 </p>
39
40 39
41 <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label> 40 <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
42 <nobr> 41 <nobr>
43 <%= ssamr_user_detail.radio_button :institution_type, true %> 42 <%= fields.radio_button :institution_type, true %>
44 <%= ssamr_user_detail.collection_select(:institution_id, Institution.find(:all, :order => "institutions.order"), :id, :name, {:selected => @selected_institution_id, :prompt => true} ).gsub('&amp;', '&') %> 43 <%= fields.collection_select(:institution_id, Institution.find(:all, :order => "institutions.order"), :id, :name, {:selected => @selected_institution_id, :prompt => true} ).gsub('&amp;', '&').html_safe %>
45 </nobr> 44 </nobr>
46 </p> 45 </p>
47 46
48 <p> 47 <p>
49 <nobr> 48 <nobr>
50 <%= ssamr_user_detail.radio_button :institution_type, false %> Other: 49 <%= fields.radio_button :institution_type, false %> Other:
51 <%= ssamr_user_detail.text_field :other_institution, :size => 19 %> 50 <%= fields.text_field :other_institution, :size => 19 %>
52 </nobr> 51 </nobr>
53 </p> 52 </p>
54 <% end %>
55 </div> 53 </div>
56 54 <% end %>
57 55
58 <%= submit_tag l(:button_save) %> 56 <%= submit_tag l(:button_save) %>
59 </div> 57 </div>
60 58
61 <div class="splitcontentright"> 59 <div class="splitcontentright">
70 </fieldset> 68 </fieldset>
71 69
72 </div> 70 </div>
73 <% end %> 71 <% end %>
74 72
75
76
77
78
79
80
81
82
83 <% content_for :sidebar do %> 73 <% content_for :sidebar do %>
84 <%= render :partial => 'sidebar' %> 74 <%= render :partial => 'sidebar' %>
85 <% end %> 75 <% end %>
86 76
87 <% html_title(l(:label_my_account)) -%> 77 <% html_title(l(:label_my_account)) -%>