<%=t('olympiamanagement.school_connection_data')%> <%=form_for @olympia_school_data_field ,:url=>{:controller=>"olympiamanagements" ,:action=>"update_school_data"} do |form|%> "> <% @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]].nil? || @olympia_school_data_field[field.keys[0]] == 0) ) ? (ClassSettingFields.all.select{|class_setting_field| class_setting_field.class_number_range[0] <= @olympia_school_data_field.class_number && class_setting_field.class_number_range[1] >= @olympia_school_data_field.class_number}.first.enrollment_available.to_s rescue ClassSettingFields.all.desc(:enrollment_available).first.enrollment_available.to_s) : @olympia_school_data_field[field.keys[0]] %>" size="<%=field.values[0]["size"]%>" type="text" id="<%= field.keys[0] %>" class="col_input<%= @extra_class%>" <%=field.values[0]["readonly"]%>/> <% else%> <% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %> <% end %>
  • <% if(!field.values[0]["hint"][I18n.locale.to_s].blank? rescue false) %> <%=field.values[0][:hint][I18n.locale.to_s]%> <% end %>
    <% end %>
    <% end %>