配置课程学时太长bug修复;

This commit is contained in:
chenmin 2014-08-15 15:58:12 +08:00
parent a420a41b78
commit bd56286b4e
1 changed files with 12 additions and 2 deletions

View File

@ -14,6 +14,16 @@
}
</script>
<script type="text/javascript">
function check(){
var regex=/^\d*$/;
if (!regex.test($("#class_period").val())){
alert("学时只能为整数");
}
}
}
</script>
<% object = [] %>
@ -67,11 +77,11 @@
-->
<% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
<span class="info" style="width: 10px;"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时",:maxlength=>5 %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
</td></tr></table></p>
<% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %></span><strong><%= l(:label_class_hour)%></strong>
<span class="info" style="width: 10px;"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时",:maxlength=>5 %></span><strong><%= l(:label_class_hour)%></strong>
</td></tr></table></p>
<% end %>