|
|
|
@ -1,42 +1,4 @@
|
|
|
|
|
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
|
|
|
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
|
|
|
|
function regexName()
|
|
|
|
|
{
|
|
|
|
|
var name = $.trim($("#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 regexDescription()
|
|
|
|
|
{
|
|
|
|
|
var name = $.trim($("#homework_attach_description").val());
|
|
|
|
|
|
|
|
|
|
if(name=="")
|
|
|
|
|
{
|
|
|
|
|
$("#homework_attach_description_span").text("作品描述不能为空");
|
|
|
|
|
$("#homework_attach_description_span").css('color','#ff0000');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$("#homework_attach_description_span").text("填写正确");
|
|
|
|
|
$("#homework_attach_description_span").css('color','#008000');
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function submit_homework_form(){if(regexName()&®exDescription()){$('#new_homework_attach').submit();}}
|
|
|
|
|
</script>
|
|
|
|
|
<div class="container" id="content">
|
|
|
|
|
<div class="Newwork">
|
|
|
|
|
<div id="tb_" class="tb_">
|
|
|
|
@ -69,7 +31,7 @@
|
|
|
|
|
</span>
|
|
|
|
|
作品名称 :
|
|
|
|
|
</label>
|
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexName();" %>
|
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexHomeworkCommonName();" %>
|
|
|
|
|
<span id="homework_attach_name_span"></span>
|
|
|
|
|
</p>
|
|
|
|
|
<p style="float:left;">
|
|
|
|
@ -79,7 +41,7 @@
|
|
|
|
|
</span>
|
|
|
|
|
作品描述 :
|
|
|
|
|
</label>
|
|
|
|
|
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
|
|
|
|
|
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexHomeworkCommonDescription();"%>
|
|
|
|
|
<p id="homework_attach_description_span" style="padding-left: 100px;"></p>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|