From 2bbcff54d33c8ba79d079540064f2ab15d94a3b0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 4 Jun 2014 10:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BD=9C=E4=B8=9A=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=BD=A2=E5=BC=8F=E9=80=89=E6=8B=A9=EF=BC=8C=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=B8=BA=E6=8F=90=E4=BA=A4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 +- app/views/bids/_fork_form.html.erb | 3 ++- app/views/bids/_homework_form.html.erb | 2 ++ app/views/projects/_homework_form.html.erb | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 87b0d8dcf..cdf6e7d5a 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -695,7 +695,7 @@ class BidsController < ApplicationController @bid.budget = 0 @bid.author_id = User.current.id @bid.commit = 0 - @bid.homework_type = params[:bid][:homework_type] + @bid.homework_type = 1 @bid.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads])) # @bid. if @bid.save diff --git a/app/views/bids/_fork_form.html.erb b/app/views/bids/_fork_form.html.erb index ea110473c..1bfb4550b 100644 --- a/app/views/bids/_fork_form.html.erb +++ b/app/views/bids/_fork_form.html.erb @@ -15,9 +15,10 @@ <%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>

-->

<%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%> -

+
<%= l(:label_attachment_plural) %>

<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>

\ No newline at end of file diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index 5aa3462fa..f726c038f 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -32,8 +32,10 @@

-->

<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>

+

<%= hidden_field_tag 'course_id', @project_id %>

<%= l(:label_attachment_plural) %> diff --git a/app/views/projects/_homework_form.html.erb b/app/views/projects/_homework_form.html.erb index e4a471367..13255120f 100644 --- a/app/views/projects/_homework_form.html.erb +++ b/app/views/projects/_homework_form.html.erb @@ -32,8 +32,10 @@

-->

<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>

+

<%= hidden_field_tag 'course_id', @project.id %>

<%= l(:label_attachment_plural) %>