#1616 修改课程时开课日期选项错误

zh
sw 11 years ago
parent b9118a0212
commit e68900b9a0

@ -450,9 +450,9 @@ module CoursesHelper
end end
#课程实践年份下拉框 #课程实践年份下拉框
def course_time_option def course_time_option year
type = [] type = []
now_year = Time.now.year now_year = year.nil? ? Time.now.year : (Time.now.year <= year ? Time.now.year : year)
for i in (now_year..now_year + 10) for i in (now_year..now_year + 10)
option = [] option = []
option << i option << i

@ -38,12 +38,18 @@
<table> <table>
<tr> <tr>
<td> <td>
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %> <span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px">
<span class="required"> *&nbsp;&nbsp;</span></span> <%= l(:label_class_period) %>
<span class="required"> *&nbsp;&nbsp;</span>
</span>
<span class="info" style="width: 10px;"> <span class="info" style="width: 10px;">
<%= text_field_tag :class_period, @course.class_period, :placeholder => "#{l(:lable_input_class)}", :maxlength => 5 %> <%= text_field_tag :class_period, @course.class_period, :placeholder => "#{l(:lable_input_class)}", :maxlength => 5 %>
</span> </span>
<span>&nbsp;<strong><%= l(:label_class_hour) %></strong></span> <span>&nbsp;
<strong>
<%= l(:label_class_hour) %>
</strong>
</span>
<span>&nbsp; <span>&nbsp;
<strong> <strong>
<%= l(:label_class_hour) %> <%= l(:label_class_hour) %>
@ -98,7 +104,7 @@
</strong> </strong>
</td> </td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag :time,options_for_select(course_time_option,@course.time), {} %> <%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
</td> </td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %> <%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>

Loading…
Cancel
Save