comparison app/views/my/account.rhtml @ 163:9a5a265e77f0 feature_55

labels correctly named institution field is now mandatory and validated.
author luisf
date Mon, 31 Jan 2011 18:10:55 +0000
parents d70a0b926135
children bb9724ba3d60
comparison
equal deleted inserted replaced
162:bd3f92477cbb 163:9a5a265e77f0
1 <%= javascript_include_tag "ssamr_institutions" %>
2
3
1 <div class="contextual"> 4 <div class="contextual">
2 <%= link_to(l(:button_change_password), :action => 'password') if @user.change_password_allowed? %> 5 <%= link_to(l(:button_change_password), :action => 'password') if @user.change_password_allowed? %>
3 <%= call_hook(:view_my_account_contextual, :user => @user)%> 6 <%= call_hook(:view_my_account_contextual, :user => @user)%>
4 </div> 7 </div>
5 <h2><%=l(:label_my_account)%></h2> 8 <h2><%=l(:label_my_account)%></h2>
33 <div class="box tabular"> 36 <div class="box tabular">
34 <% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %> 37 <% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %>
35 <p> 38 <p>
36 <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %> 39 <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %>
37 </p> 40 </p>
38 <p> 41
39 <label for="ssamr_user_institution"><%=l(:label_ssamr_institution)%></label> 42
40 <%= ssamr_user_detail.collection_select(:institution_id, Institution.all, :id, :name, {:selected => @user.ssamr_user_detail.institution_id.to_i} ) %> 43 <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
41 </p> 44 <%= ssamr_user_detail.radio_button :institution_type, true %>
45 <%= ssamr_user_detail.collection_select(:institution_id, Institution.all, :id, :name, {:selected => @selected_institution_id} ) %>
46 </p>
47
48
49
50 <p>
51 <%= ssamr_user_detail.radio_button :institution_type, false %> Other:
52 <%= ssamr_user_detail.text_field :other_institution %>
53 </p>
42 <% end %> 54 <% end %>
43 </div> 55 </div>
44 56
45 57
46 <%= submit_tag l(:button_save) %> 58 <%= submit_tag l(:button_save) %>