cirandas.net

ref: master

app/views/profile/send_mail.html.erb


<%= h profile.short_name(50) %>

<%= _('Send e-mail to members') %>

<%= 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')) %>
<% 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 %>
<%= form_for :mailing, :url => {:action => 'send_mail'}, :html => {:id => 'mailing-form'} do |f| %> <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %> <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'body ' + current_editor)) %> <%= submit_button(:send, _('Send')) %> <%= button :cancel, _('Cancel e-mail'), :back %> <% end %>