创建作品

<%= form_for(@stundet_work, :html => { :multipart => true }, :url => {:controller => 'student_work', :action => 'create', :homework => @homework.id }) do |f|%>
<% if @homework.homework_type == 1%>
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
<% end%>

<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %> <% if @homework.homework_type != 2%> 项目信息 <% end%>

<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>

<%= f.text_area "description", :class => "w620 hwork_txt ", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>

<% if @homework.homework_type != 2%>

<%= render :partial => 'attachments/new_form' %>

<% end%>

提交作品 <%= link_to "返  回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>

<% end%>