<%=t('olympiamanagement.'+(!@olympia_school_data_field.new_record? ? 'edit_school_data' : 'add_school_data'))%>
<%=form_for @olympia_school_data_field ,:url=>{:controller=>"olympiamanagements" ,:action=>"update_school_data",:type=>"add_school_data",:id=>params[:id]} do |form|%> <% @SchoolDataField.school_data_fields.each do |field| %>
<% @extra_class = ((field.values[0]["required"] == "true")? " required" : "")%> <% @extra_text = ((field.values[0]["required"] == "true")? "*" : "")%>
<%= @extra_text+t('olympiamanagement.'+field.keys[0]) %>
<% if field.values[0][:type] != 'select' %>
" value="<%= (field.keys[0]=="enrollment_limited"&&@olympia_school_data_field[field.keys[0]]== 0 ) ? "" : @olympia_school_data_field[field.keys[0]] %>" size="<%=field.values[0][:size]%>" type="text" id="<%= field.keys[0] %>" class="col_input<%= @extra_class%>"/> <% else%> <% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %>
" id="<%=field.keys[0]%>" class="required" value="<%= @olympia_school_data_field[field.keys[0]] %>" style="width: auto;">
<%=@please_choice%>
<% for @num in field.values[0]["range"][0] .. field.values[0]["range"][1] %> <%= ('
' + @num.to_s + field.values[0][:unit][I18n.locale.to_s] + '
').html_safe %> <% end %>
<% end %>
<% if !field.values[0][:hint][I18n.locale.to_s].blank? %>
<%=field.values[0][:hint][I18n.locale.to_s]%>
<% end %>
<% end %>
<% end %>