%= error_messages_for 'deal' %>
<%= f.text_field :name, :label=>l(:field_deal_name), :size => 80, :required => true %>
<%= f.text_area :background , :cols => 80, :rows => 8, :class => 'wiki-edit', :label=>l(:field_deal_background) %>
<%= wikitoolbar_for 'deal_background' %> <% if @project.deal_statuses.any? %><%= f.select :status_id, collection_for_status_select, :include_blank => false, :selected => @deal.status_id.to_s, :label=>l(:field_contact_status) %>
<% end %> <% unless @project.deal_categories.empty? %><%= f.select :category_id, (@project.deal_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> <%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'), l(:label_deal_category_new), 'category[name]', {:controller => 'deal_categories', :action => 'new', :project_id => @project}, :title => l(:label_deal_category_new), :tabindex => 199) if authorize_for('deal_categories', 'new') %>
<% end %><%= f.select :contact_id, (@project.contacts.visible.collect {|p| [ p.name, p.id ] }), :include_blank => true, :label=>l(:field_deal_contact) %> <%= link_to image_tag('add.png', :style => 'vertical-align: middle;'), {:controller => 'contacts', :action => 'new', :project_id => @project}, :confirm => l(:text_are_you_sure), :title => l(:label_contact_new) if authorize_for('contacts', 'new') %>
<%= f.text_field :price, :label => l(:field_deal_price), :size => 10 %> <%= select_tag "deal[currency]", options_for_select(collection_for_currencies_select.insert(0, ['', '']), @deal.currency), :include_blank => true %>
<% @deal.custom_field_values.each do |value| %><%= custom_field_tag_with_label :deal, value %>
<% end -%><%= f.select :assigned_to_id, (@project.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true, :label => l(:label_assigned_to) %>