<%= stylesheet_link_tag "lib/fileupload"%> <%= javascript_include_tag 'lib/bootstrap-fileupload' %>
<%=t('olympiamanagement.'+(!@olympia_student_data.new_record? ? 'edit_sign_up_student_data' : 'add_sign_up_student_data'))%> <%=form_for @olympia_student_data ,:url=>{:controller=>"olympiamanagements" ,:action=>"updata_student_data",:type=>"add_student_data",:id=>params[:id]}, :html => {:multipart => true} do |form|%> <% @student_data_field.student_data_fields.each do |field| %>
<% @extra_class = ((field.values[0]["required"] == "true")? " required" : "")%> <% @extra_text = ((field.values[0]["required"] == "true")? "*" : "")%> <%if !["StudentBirthYear","StudentBirthMonth","StudentBirthDay"].include?(field.keys[0]) %>
  • <%= @extra_text+t('olympiamanagement.'+field.keys[0]) %>
  • <%elsif field.keys[0]=="StudentBirthYear"%>
  • <%= @extra_text+t('olympiamanagement.birth_date') %>
  • <%end%>
  • <% if field.values[0][:type] == 'String' %> " value="<%= @olympia_student_data[field.keys[0]].to_s %>" size="<%=field.values[0][:size]%>" id="<%= field.keys[0] %>" class="col_input<%= @extra_class%>"/> <% elsif field.values[0][:type] == 'select_num' %> <% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %> <%if ["StudentBirthMonth","StudentBirthDay"].include?(field.keys[0]) %> <%=t('olympiamanagement.'+field.keys[0])%> <%end%> <% elsif field.values[0][:type] == 'Year' %> <%=t('olympiamanagement.a_d_')%> <% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %> <%=t('olympiamanagement.year')%> <% elsif field.values[0][:type] == 'select_string' %> <% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %> <% elsif field.values[0][:type] == 'radio' %> <%field.values[0][:choices].each_with_index do |choice,i|%> " id="<%="#{field.keys[0]}_#{choice}"%>" class="required" value="<%=choice%>" <%= (@olympia_student_data[field.keys[0]].to_s== choice.to_s) ? 'checked=checked' : '' %>> <% end %> <% elsif field.values[0][:type] == 'File' %> <%= fields_for :add_student_data do |student_data| %> <%= render :partial => 'image_form', :object => @olympia_student_data, :locals => {:f => student_data,:@extra_class=>@extra_class,:image_field_name=>:olympia_student_images,:field_name=>:student_file,:image_id=>field.keys[0]} %> <%end%> <% end %>
  • <% if !field.values[0][:hint][I18n.locale.to_s].blank? %> <%=field.values[0][:hint][I18n.locale.to_s]%> <% end %>
    <% end %>
    <% end %>