<%
    membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
    option = []
    membership.each do |member|
      unless(member.project.project_type==1)
        member.member_roles.each{|role|
          if role.allowed_to?(:quote_project)
          option << member.project
          end
        }
      end
    end
    %>

<div id="put-bid-form">
   	<%= form_for "bid_for_save", 
					 
					:url => {:controller => 'bids', :action => 'add'},
					:update => "bidding_project_list" do |f| %>
	    <table id="bidding_table" border="0" width="100%">
			<tr>
				<td>
					<%= select_tag 'bid', options_for_select(select_option_helper(option)), :name => 'bid', :class => 'grayline', style:'width:83%;' %>
					<div class="font_lighter" style="display:inline-block;font-size: 13px;">
					<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%>
					</div>
				</td>
			</tr>

			<tr>
				<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason_homework), :style => "resize: none;", :class => 'noline'%></td>
			</tr>

			<tr>
				<td align="right">
				<%= submit_tag l(:label_commit_homework), :name => nil , :class => "enterprise"%>
				</td>
			</tr>
	    </table>
    <% end %>
</div>