|
|
|
@ -1,9 +1,24 @@
|
|
|
|
|
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
function submit_homework_form()
|
|
|
|
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
|
|
|
|
function regexName()
|
|
|
|
|
{
|
|
|
|
|
$('#new_homework_attach').submit();
|
|
|
|
|
var name = $("#homework_attach_name").val();
|
|
|
|
|
|
|
|
|
|
if(name=="")
|
|
|
|
|
{
|
|
|
|
|
$("#homework_attach_name_span").text("名称不能为空");
|
|
|
|
|
$("#homework_attach_name_span").css('color','#ff0000');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$("#homework_attach_name_span").text("填写正确");
|
|
|
|
|
$("#homework_attach_name_span").css('color','#008000');
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function submit_homework_form(){if(regexName()){$('#new_homework_attach').submit();}}
|
|
|
|
|
</script>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="Newwork">
|
|
|
|
@ -36,7 +51,8 @@
|
|
|
|
|
</span>
|
|
|
|
|
作品名称 :
|
|
|
|
|
</label>
|
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称" %>
|
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onblur => "regexName();" %>
|
|
|
|
|
<span id="homework_attach_name_span"></span>
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<label> 提交项目
|
|
|
|
|