diff 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
line wrap: on
line diff
--- a/app/views/my/account.rhtml	Mon Jan 31 17:00:28 2011 +0000
+++ b/app/views/my/account.rhtml	Mon Jan 31 18:10:55 2011 +0000
@@ -1,3 +1,6 @@
+<%= javascript_include_tag "ssamr_institutions" %>
+
+
 <div class="contextual">
 <%= link_to(l(:button_change_password), :action => 'password') if @user.change_password_allowed? %>
 <%= call_hook(:view_my_account_contextual, :user => @user)%>
@@ -35,10 +38,19 @@
        <p>
          <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 25, :required => true, :class => 'wiki-edit' %>
        </p>
-       <p>
-         <label for="ssamr_user_institution"><%=l(:label_ssamr_institution)%></label>
-         <%= ssamr_user_detail.collection_select(:institution_id, Institution.all, :id, :name, {:selected => @user.ssamr_user_detail.institution_id.to_i} ) %>
-       </p>
+
+
+            <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
+              <%= ssamr_user_detail.radio_button :institution_type, true %>
+              <%= ssamr_user_detail.collection_select(:institution_id, Institution.all, :id, :name, {:selected => @selected_institution_id} ) %>
+            </p>
+
+
+
+            <p>
+               <%= ssamr_user_detail.radio_button :institution_type, false %> Other:
+               <%= ssamr_user_detail.text_field :other_institution %>
+            </p>
     <% end %>
 </div>