2020-01-29 11:26:44 +00:00
|
|
|
<link rel="stylesheet" media="screen" type="text/css" href="/assets/admin/olympiamanagement.scss">
|
|
|
|
<link rel="stylesheet" media="print" type="text/css" href="/assets/admin/olympiamanagement.scss">
|
|
|
|
<script src="/assets/admin/olympiamanagement.js"></script>
|
|
|
|
<fieldset class="fieldset_block">
|
|
|
|
<legend class="fieldset_title"><%=t('olympiamanagement.'+(!@olympia_school_data_field.new_record? ? 'edit_school_data' : 'add_school_data'))%></legend>
|
|
|
|
<%=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| %>
|
|
|
|
<div class="col_text">
|
|
|
|
<% if field.values[0][:type] != 'select' %>
|
|
|
|
<li class="col" for="<%=field.keys[0]%>"><%= t('olympiamanagement.'+field.keys[0]) %></li><li class="col_r"><input name="<%="[add_school_data][#{field.keys[0]}]"%>" value="<%= @olympia_school_data_field[field.keys[0]] %>" size="<%=field.values[0][:size]%>" type="text" id="<%= field.keys[0] %>" class="col_input"/></li>
|
|
|
|
<% else%>
|
|
|
|
<% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %>
|
|
|
|
<li class="col" for="<%=field.keys[0]%>"><%= t('olympiamanagement.'+field.keys[0]) %></li><li class="col_r">
|
|
|
|
<select name="<%="[add_school_data][#{field.keys[0]}]"%>" id="<%=field.keys[0]%>" class="required" value="<%= @olympia_school_data_field[field.keys[0]] %>" ><option value=""><%=@please_choice%></option>
|
|
|
|
<% for @num in field.values[0]["range"][0] .. field.values[0]["range"][1] %>
|
|
|
|
<%= ('<option value="' + @num.to_s + '">' + @num.to_s + field.values[0][:unit][I18n.locale.to_s] + '</option>').html_safe %>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
<% end %>
|
|
|
|
<% if !field.values[0][:hint][I18n.locale.to_s].blank? %>
|
|
|
|
<span id="-H" class="field-hint-inactive"><%=field.values[0][:hint][I18n.locale.to_s]%></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
<input type="submit" name="Submit" value="<%=t('olympiamanagement.confirm')%>">
|
|
|
|
<input type="reset" name="Submit" value="<%=t('olympiamanagement.cancel')%>">
|
|
|
|
<% end %>
|
|
|
|
</fieldset>
|