<%= l(:label_crm_bulk_send_mail_selected_contacts) %>

<%= form_for(:email_message, :url => {:action => 'send_mails', :project_id => @project}, :html => {:multipart => true, :id => 'message-form'}) do %> <%= @contacts.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %>

<%= text_field_tag('from', "#{User.current.name} <#{User.current.mail}>", :style => "width: 98%;") %> <%= link_to "#{l(:label_crm_contacts_cc)}/#{l(:label_crm_contacts_bcc)}", '#' , :onclick => "$('#mail_cc').show();$(this).hide();" %>

<%= text_field_tag('subject', '', :id => "subject", :style => "width: 98%;") %>

<%= text_area_tag 'message-content', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %> <%= l(:text_email_macros, :macro => "%%NAME%%, %%LAST_NAME%%, %%MIDDLE_NAME%%, %%FULL_NAME%%, %%COMPANY%%, %%DATE%%, %%[Custom field]%%") %>

<%= wikitoolbar_for 'message-content' %>

<%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %>

<%= submit_tag l(:button_submit) %> <%= preview_link({ :controller => 'contacts', :action => 'preview_email' }, 'message-form') %>

<% end %>
<% content_for :header_tags do %> <%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %> <% end %>