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/contacts/edit_mails.html.erb
2012-01-03 16:18:32 +00:00

66 lines
2.2 KiB
Plaintext

<h2><%= l(:label_bulk_send_mail_selected_contacts) %></h2>
<div class="box" id="duplicates">
<ul>
<% @contacts.each do |contact| %>
<li>
<%= avatar_to contact, :size => "16" %>
<%= link_to_source contact %>
<%= "(#{contact.job_title}) " unless contact.job_title.blank? %>
- <%= contact.emails.first %>
</li>
<% end %>
</ul>
</div>
<% form_for(:email_message, :url => {:action => 'send_mails'}, :html => {:multipart => true, :id => 'message-form'}) do %>
<%= @contacts.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
<div class="box tabular">
<p>
<label><%= l(:field_mail_from) %></label>
<%= text_field_tag('from', User.current.mail, :id => "email", :size => 30) %>
</p>
<!-- <p>
<label><%= l(:setting_bcc_recipients) %></label>
<%= text_field_tag('bcc', User.current.mail, :id => "email", :size => 30) %>
</p> -->
<p>
<label><%= l(:field_subject) %></label>
<%= text_field_tag('subject', '', :id => "subject", :size => 100) %>
</p>
<p>
<label><%= l(:field_message) %></label>
<%= text_area_tag 'message-content', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<em><%= l(:text_email_macros, :macro => "%%NAME%%, %%LAST_NAME%%, %%MIDDLE_NAME%%, %%FULL_NAME%%, %%COMPANY%%, %%DATE%%, %%[Custom field]%%") %></em>
</p>
<%= wikitoolbar_for 'message-content' %>
<p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %></p>
</div>
<p>
<%= submit_tag l(:button_submit) %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'contacts', :action => 'preview_email' },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('message-form')",
:complete => "Element.scrollTo('preview')"
}, :accesskey => accesskey(:preview) %>
</p>
<% end %>
<div id="preview" class="wiki"></div>
<% content_for :header_tags do %>
<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %>
<%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %>
<% end %>