This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_rodax_crm/app/views/deals/_form.html.erb
2012-01-03 16:18:32 +00:00

39 lines
2.1 KiB
Plaintext

<%= error_messages_for 'deal' %>
<div class = "box tabular">
<p><%= f.text_field :name, :label=>l(:field_deal_name), :size => 80, :required => true %></p>
<p class = "notes"><%= f.text_area :background , :cols => 80, :rows => 8, :class => 'wiki-edit', :label=>l(:field_deal_background) %></p> <%= wikitoolbar_for 'deal_background' %>
<% if @project.deal_statuses.any? %>
<p><%= f.select :status_id, collection_for_status_select, :include_blank => false, :selected => @deal.status_id.to_s, :label=>l(:field_contact_status) %></p>
<% end %>
<% unless @project.deal_categories.empty? %>
<p><%= 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') %></p>
<% end %>
<p>
<%= 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') %>
</p>
<p>
<%= 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 %>
</p>
<% @deal.custom_field_values.each do |value| %>
<p>
<%= custom_field_tag_with_label :deal, value %>
</p>
<% end -%>
<p><%= f.select :assigned_to_id, (@project.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true, :label => l(:label_assigned_to) %></p>
</div>