diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 44e12ba6a..af81a69ed 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -407,7 +407,7 @@ class BidsController < ApplicationController @bid = Bid.new @bid.name = params[:bid][:name] @bid.description = params[:bid][:description] - @bid.reward_type = params[:bid_reward_type] + @bid.reward_type = 1 @bid.budget = params[:bid][:budget] @bid.deadline = params[:bid][:deadline] @bid.author_id = User.current.id diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 941e3bf19..d05a1f59c 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -68,8 +68,10 @@ class MyController < ApplicationController @user.safe_attributes = params[:user] @user.pref.attributes = params[:pref] @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') - if params[:identity] == "2" + unless @user.user_extensions.nil? + if @user.user_extensions.identity == 2 @user.firstname = params[:enterprise_name] + end end diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index eb992840d..840a661cc 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -19,7 +19,12 @@ <% end %>
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_name)}" %>
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_description)}" %>
-<%= select_tag 'bid_reward_type', "".html_safe, - :onChange => "show('bid_reward_type', 'bid_budget', '"+l(:label_bids_reward_what)+"','"+l(:label_bids_new_money)+"','"+l(:label_bids_new_credit)+"','"+l(:label_bids_new_content)+"')" %> - <%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %> +
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_new_money) %> diff --git a/app/views/projects/_new_join.html.erb b/app/views/projects/_new_join.html.erb index 82cc61b4d..e26caeab3 100644 --- a/app/views/projects/_new_join.html.erb +++ b/app/views/projects/_new_join.html.erb @@ -47,7 +47,7 @@
- | + <%= text_field_tag 'course_password', nil, :style => 'width:200px'%> <%= text_field_tag 'course_password', nil, :size => 45 %> diff --git a/app/views/users/_my_create_homework.html.erb b/app/views/users/_my_create_homework.html.erb index 2b92606a4..1fd948605 100644 --- a/app/views/users/_my_create_homework.html.erb +++ b/app/views/users/_my_create_homework.html.erb @@ -22,7 +22,12 @@<% if bid.reward_type.nil? or bid.reward_type == 1 %> <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2 %> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> <% end %> |
<%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid.id) %>)<%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) | ++ <% if bid.homework_type == 1%> + <%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<%= link_to bid.homeworks.count, project_for_bid_path(bid.id) %>) + <% else %><%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid.id) %>)<% end %> + + <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) |