send_mail.html.erb
1.12 KB
<h1><%= h profile.short_name(50) %></h1>
<h2><%= _('Send e-mail to members') %></h2>
<%= error_messages_for :mailing %>
<% to = @mailing.data[:members_filtered].present? ? @mailing.recipients.map{|r| r.name}.join(', ') : _('All members')%>
<%= labelled_form_field(_('To:'), text_area(:data, 'members_filtered', :value => to, :rows => 4, :disabled => 'disabled', :class => 'send-mail-recipients')) %>
<div class="template-selection">
<% if @email_templates.present? %>
<%= labelled_form_field(_('Select a template:'), select_tag(:template, options_from_collection_for_select(@email_templates, :id, :name), :include_blank => true, 'data-url' => url_for(:controller => 'email_templates', :action => 'show_parsed'))) %>
<% end %>
</div>
<%= form_for :mailing, :url => {:action => 'send_mail'}, :html => {:id => 'mailing-form'} do |f| %>
<%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
<%= render :file => 'shared/tiny_mce' %>
<%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
<%= submit_button(:send, _('Send')) %>
<%= button :cancel, _('Cancel e-mail'), :back %>
<% end %>